-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
infra: add support for netdriver fuzzing with honggfuzz #7351
infra: add support for netdriver fuzzing with honggfuzz #7351
Conversation
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.
LGTM
Another exciting change!
I think this could face some of the issues mentioned in #7347 |
Sorry for late response, I think this can be useful /* HF NetDriver signature - if found within file, it means it's a NetDriver-based binary */
#define _HF_NETDRIVER_SIG "\x01_LIBHFUZZ_NETDRIVER_BINARY_SIGNATURE_\x02\xFF" |
@jonathanmetzman -- you approved this but I wanted to double check if it's ready before merging it in? |
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 lets wait until I make some ClusterFuzz-side changes to merge this.
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.
We're kicking off a deployment for the ClusterFuzz instance, so this should hopefully be ready to go there soon.
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.
thanks!
Adds an example with the mongoose webserver
One thing left is removing the definitions from the build.sh currently defined by way of the compile line into the compile_honggfuzz
ab3845b
to
6833c6e
Compare
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.
lgtm
HFND_FUZZING_ENTRY_FUNCTION(int argc, char **argv) { | ||
struct mg_mgr mgr; | ||
mg_mgr_init(&mgr); | ||
mg_http_listen(&mgr, "http://0.0.0.0:8666", fn, &mgr); |
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 have some issues when we have multiple fuzzers. Because we run bad_build_check on all of them at once but they can't use the same port.
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.
True, would you prefer to address this now? One solution is to scan the fuzzers and check if there is more than one fuzzer with netdriver settings, and, if so, avoid running the fuzzers in parallel.
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'm not sure if that's the case here, but hf netdriver uses net namespaces just for that. It should work with a single/same port per fuzzing thread.
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.
Awesome!
/gcbrun trial_build.py mongoose --sanitizer address coverage memory undefined --fuzzing-engine libfuzzer afl honggfuzz |
Trial builds don't work here because they don't work on forked repos :-( |
Do I need to do something to make this work, or how do you prefer to move forward? |
The changes look relatively self contained, so let's merge. Going forward, for infra-related PRs like these, can you create them off a branch on the main repo instead? |
It shouldn't be too hard to support forks, I'm just avoiding implementing this to reduce bus factor: #8273 |
Adds an example with the mongoose webserver