-
Notifications
You must be signed in to change notification settings - Fork 109
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
cargo afl run
dumps core and exits status code 1, nothing reported?
#424
Comments
For what it is worth, here is the backtrace I received from the core file. Backtrace
I can see it it panics at the appropriate location and then later aborts, so I hope I'm not misunderstanding how afl is intended to be used? I noticed the rust-fuzz tutorial mentions the following:
So it's not clear to me if |
First of all, thank you for the meticulous reproduction instructions! I agree the behavior you've described/observed is not great. For comparison, it looks like libfuzzer calls the previous hook before aborting: https://github.com/rust-fuzz/libfuzzer/blob/910a31af2be04fa135da9361a5089b8c39c0b631/src/lib.rs#L89-L93 I opened a PR to emulate this behavior in afl.rs. Could I impose on you to try it? Unfortunately, because afl.rs's full submodule tree is large, it's best to clone it and refer to it by path. That is: git clone https://github.com/rust-fuzz/afl.rs
cd afl.rs
git checkout call-existing-panic-hook And then change the afl = { path = "path-to-afl-subdirectory-of-cloned-repo" } Please let me know if this more closely matches what you'd expect, or if you think there is still room for improvement. |
This matches what I'd expect, thank you. Out of curiosity, what does the typical use-case of the afl crate look like? I was trying my best to follow the rust-fuzz tutorial, but am wondering if I am using it as you expect normal users would? I'm mainly using it to catch unexpected panics in the (preferably) non-panicking APIs of my libraries. I ruled out |
I'm not sure, TBH. I think a common use case is to verify the absence of crashes. For example, I think that is what Personally, I most often use afl.rs through this wrapper: https://github.com/trailofbits/test-fuzz The problem you pointed out was in the Sorry I don't have a good answer to your question. |
No reason to apologize, this actually helps a lot! I wasn't aware of I think your PR addresses my issue, so feel free to close. |
Thanks for your inquiry, which has improved the codebase! |
I am trying to run the following per the rust-fuzz tutorial:
I'm a new user to afl so I'm not sure if I'm using this correctly, but it produces a core dump and returns status code 1. No stdout or stderr is reported to the user.
Steps to Reproduce (MRE)
Press CTRL+C after at least one crash, and then run the following:
When I run this, it returns exit code 1 and produces a core dump in my current directory.
Meta
rustc --version --verbose
:cargo --version --verbose
uname -imrs
cargo afl --version
The text was updated successfully, but these errors were encountered: