-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fuzzing: initial fuzzing implementation #113
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a few comments, but besides those this looks good overall. Thanks for working on fuzzing, it already uncovered some bugs.
56abe65
to
e8f0cba
Compare
Also made |
1740cb1
to
4ebf471
Compare
Last version: rebased on main and fixed the ACPI harness to accommodate the new |
Refactor the public function parse_fw_meta_data() so that the caller can provide an slice containing the firmware metadata. This will help building a fuzzing harness around this interface Signed-off-by: Carlos López <[email protected]>
Add fuzzing to the COCONUT SVSM project via cargo-fuzz. This commit adds the base infrastructure for fuzzing, as well as two harnesses for testing the fw_meta and ACPI table interfaces respectively. This works towards issue coconut-svsm#34. Signed-off-by: Carlos López <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Add documentation (FUZZING.md) regarding the use of fuzzing harnesses via cargo-fuzz. Signed-off-by: Carlos López <[email protected]>
Signed-off-by: Carlos López <[email protected]>
We were runninng clippy on tests in Github Actions, but not locally. Additionally, run it con fuzzing harnesses as well. Signed-off-by: Carlos López <[email protected]>
Add a new method to retrieve the current position of the FileHandle. Signed-off-by: Carlos López <[email protected]>
Add a new harness to fuzz the filesystem implementation by issuing random operations such as creating, opening and closing files and reading and writing from them. Signed-off-by: Carlos López <[email protected]>
Limit hypervisor-controlled allocation sizes to prevent potential OOM issues. This is done in places where big allocation sizes(for example a huge number of firmware files or very big ACPI tables) would make no sense in a reasonable implementation. This will also be useful for fuzzing performance once coconut-svsm#113 is merged. Signed-off-by: Carlos López <[email protected]>
Dropped |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now.
This PR adds:
cargo-fuzz
.fw_meta
)Works towards #34