-
-
Notifications
You must be signed in to change notification settings - Fork 371
Windows Support for LibAFL-LibFuzzer #3130
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
Windows Support for LibAFL-LibFuzzer #3130
Conversation
…r libafl-libfuzzer
|
||
[target.'cfg(not(windows))'.features] | ||
## Enable the `fork` feature on non-windows platforms | ||
default = ["fork", "tui_monitor"] |
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.
don't think we need tui_monitor on non-win
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 have to put in a few libs anyway to get this to work so I'll just revert this part of the changes and make tui_monitor work.
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.
Don't fully get the tui monitor thing - it's just not working on Win yet?
This is in MVP working state now with some updates still needed:
Howto test:
|
FWIW the |
This seems to be 100% working now! Just need to do a style pass. |
Nice 💯 |
Ok, adding a CI workflow today or maybe tomorrow (I have actual work to do but it should be relatively quick). |
Please do a justfile entry that is easy to run locally |
We need to land #3099 |
do you have any update? |
Not yet, sorry :) I've been super busy with some other stuff. Still on my radar, I'll finish it up when I have a chance. |
Status? We're going to do a new release soon |
[features] | ||
default = ["fork"] | ||
default = [] |
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 think fork as default is good for perf on non-windows, it's a nop on win
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 have it set below that on non-windows to keep things explicit and because tui_monitor needs to be default on non-win anyway, but I can change it if wanted.
@novafacing any update? |
Ok, added. Let's see if I can one-shot the test working :) |
Ok, looks like test is passing so this is ready for a real look :) |
destroy_output_fds(options); | ||
|
||
fuzz_with!(options, harness, do_fuzz, |fuzz_single| { | ||
let mgr = SimpleEventManager::new(MultiMonitor::new(create_monitor_closure())); |
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.
LibAFL_Libfuzzer doesn't support Llmp?
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 guess it doesn't right now but no reason we couldn't add it. Could use llmp+multiprocessing on windows where we can't fork
@@ -358,6 +363,47 @@ impl<'a> LibfuzzerOptionsBuilder<'a> { | |||
} | |||
"runs" => self.runs = parse_or_bail!(name, value, usize), | |||
"close_fd_mask" => self.close_fd_mask = parse_or_bail!(name, value, u8), | |||
"help" => { |
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.
This will go out of date at some time but I don't have a good solution either
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.
Yeah unfortunately using e.g. clap is blocked on clap-rs/clap#1210 and I don't know of another good arg parsing library that supports this arg format
@@ -0,0 +1,89 @@ | |||
#!/usr/bin/env pwsh |
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.
Maybe call that guy from a justfile?
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.
Good idea, I'll add a justfile for libafl_libfuzzer and libafl_libfuzzer_runtime.
Looks pretty good, awesome! |
Ok! I think we're good |
Description
Support for Windows with LibAFL-LibFuzzer. This is a draft with a couple issues still persisting.
Checklist
./scripts/precommit.sh
and addressed all comments