-
-
Notifications
You must be signed in to change notification settings - Fork 367
Need examples for instrumenting and fuzzing Rust program #1904
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
Comments
Hey, if this isn't done in the next week, feel free to ping me -- this is something I've been meaning to do for a while. |
I have something working already.
And I have a build.rs to link the fuzzer as a staticlib. It is kinda weird: harness |
Yeah, there are more elegant ways to do this which definitely justifies having an example. |
@addisoncrump Hey, how is it going with the example? |
Hey, haven't gotten to it yet. Thanks for the reminder. |
@addisoncrump Add a rust instrumentation example, please :) |
I tried the approach in this book and it builds/runs but the coverage instrumentation doesn't appear to be working. It'd be nice to have some tool like afl-hitmap to check Next, I tried the approach I found searching through the discord of creating a fuzzer based on libfuzzer_png, building a static library, trying to link the fuzzer and target, and using libfuzzer-sys' custom runtime env variable override. I can't reproduce it now because I am getting undefined references to symbol It'd be really nice to package this up in a template or something like cargo-fuzz bc it's hard to take advantage of things like LibAFL's nautilus for pure Rust targets. |
@0xalpharush You can check my hacky example: https://github.com/KaminariOS/tree-fuzzer |
Thanks! Does this require cargo-fuzz to run or what is the proper way? I ran
This does not seem to execute anything:
|
You need to download seeds by yourself. The fuzzer is working but without any seeds. |
Is your feature request related to a problem? Please describe.
I know that I can use libcc to instrument a C program but I am not sure how to instrument a Rust program and get the coverage data.
Describe the solution you'd like
A simple example of coverage-guided Rust program fuzzing
The text was updated successfully, but these errors were encountered: