-
Notifications
You must be signed in to change notification settings - Fork 113
add AFL++ IJON functionality #655
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
Conversation
Thanks, @vanhauser-thc. I'm going to have to read that paper. Is there a simple test that could be added to verify that the new functions a macros work as intended? |
as long as the afl++ state in afl.rs does not include the feature this could not work :) |
I will want to read the paper to convince myself this is worthwhile, and there should be a test to verify that this works correctly. But, beyond that, I can't see any reason to object. |
I added an example (wont work yet), but shows an easy example: finding a way through a maze to an exit. |
Nice!
I don't know the problem you are referring to. Could you provide me a link? |
uh I somehow didn't push the change. Let me paste it here:
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
added a test.
|
there are built failures for arm64 I do not understand why they happen. does arm64 need something specific handling? |
Not that I know of, but that's also not a platform that we normally test. Could you point me to the failures? |
Ah it looks like the CI failures happen when the "have afl++ native plugins" is false - obviously, as ijon requires that, and hence the maze cannot be solved. |
There may be a better way, but 19d50be should work. |
I will update the PR once the release commit is done, then it can be merged. two items:
as this is your code dunno how you want this fixed.
|
I opened a Clippy issue to see whether they would consider disabling that lint in test code: rust-lang/rust-clippy#15780 But, for now, you can just precede the statement with: #[allow(clippy::explicit_write)]
Please keep it the Rusty way. Just FYI, I still have to review the PR carefully. I may have additional suggestions. |
One Ubuntu instance is failing, and I notice that it executed the maze twice. the first time it works fine, the second there is not a single coverage item found. |
I'm having trouble spotting the successful run. Could you point me to where in GitHub's output this is indicated? Can I take it the test passes consistently locally? |
https://github.com/rust-fuzz/afl.rs/actions/runs/18123061265/job/51571862454?pr=655 I don't know what is different between the two runs.
works without issues for me. and for the CI, except for that one specific test target - see above |
I think like 486 is a different test: afl.rs/cargo-afl/tests/integration.rs Lines 28 to 29 in 74907b9
EDIT: But to your point, I do wonder if the tests could be interfering with each other somehow. |
then I don't know why it is failing. Rust / build (ubuntu-latest, nightly, true, clang) (pull_request) Failing after 8m all other ubuntu and macos variants are succeeding. |
Is there any chance the feature is non-deterministic in AFL++? |
Fuzzing should not be deterministic :-) Issue was this:
it did not find a single bit of coverage, and that means something went very wrong. and this is not something that happens due bad RNG. But now the CI is green. so dunno what happened. between the failed CI and the green CI there was only a clippy ignore change, so I can only attribute this to ubuntu-latest/llvm issues. |
new AFL++ version was released, this could now be merged. |
You probably noticed this, but two ubuntu-latest jobs failed this time. I would like the tests to pass consistently. I can think of three possibilities right now:
|
I tried the newest AFL++ with ubuntu:latest with a Docker container and everything including ijon runs fine. |
Co-authored-by: Samuel Moelius <[email protected]>
Co-authored-by: Samuel Moelius <[email protected]>
Co-authored-by: Samuel Moelius <[email protected]>
Co-authored-by: Samuel Moelius <[email protected]>
Co-authored-by: Samuel Moelius <[email protected]>
Co-authored-by: Samuel Moelius <[email protected]>
Co-authored-by: Samuel Moelius <[email protected]>
Co-authored-by: Samuel Moelius <[email protected]>
Co-authored-by: Samuel Moelius <[email protected]>
no clue what the issue with the CI is. |
Sorry, but does Here, for example, is a run where it seems to get stuck at 116 corpus entries. It starts to find its way out, but the time remaining is not sufficient to find a crash: https://github.com/smoelius/afl.rs/actions/runs/18360989062/job/52304402582#step:9:597 Would you consider adapting |
for me it works 100% of the time. |
yay green! |
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.
Just a few more small suggestions and then I will merge this.
Co-authored-by: Samuel Moelius <[email protected]>
done |
Thanks, again. 🙏 |
AFL++ received IJON functionality (currently in the dev branch).
This makes functions available that users can use in their C/C++ code to help fuzzing states.
(very impressive, see: https://github.com/RUB-SysSec/ijon/blob/master/img/demo.gif and https://nyx-fuzz.com/papers/ijon.pdf).
I tried to transform all the macros and C functions.
Not sure if this is the way to make them available...