Skip to content
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

Write fuzz harnesses to ready-to-use projects #4

Open
Shnatsel opened this issue Mar 23, 2019 · 2 comments
Open

Write fuzz harnesses to ready-to-use projects #4

Shnatsel opened this issue Mar 23, 2019 · 2 comments

Comments

@Shnatsel
Copy link
Member

Fuzzing harness generator should operate in a manner similar to cargo fuzz init: it should create a subfolder in your project that would already have a Cargo.toml and have everything ready to go.

Since currently some harnesses may not be generate correctly and may not compile, we do not want to take the cargo-fuzz approach of "one project with many binaries", but rather generate multiple independently compiled projects so that if one fails to compile, the rest can still function.

@Shnatsel
Copy link
Member Author

Right now fuzzing harnesses are not even written to individual files, they're just returned as strings. We probably want to write a layer on top of that.

@Shnatsel
Copy link
Member Author

Sample Cargo.toml to generate: https://github.com/Shnatsel/image-png/blob/master/png-afl/Cargo.toml
The rest of that directory layout can be used as reference as well.

https://github.com/Eh2406/auto-fuzz-test/blob/master/src/crate_parse.rs provides facilities for parsing Cargo.toml of the crate to fuzz, but for now we can get away with just passing it on the command line - we'll need to add it anyway to support non-Cargo build systems eventually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant