-
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
Add fuzzer scripts for botan #150
Conversation
RUN git clone --depth 1 https://github.com/randombit/botan.git botan | ||
WORKDIR botan | ||
COPY build.sh $SRC/ | ||
RUN ls -R $SRC/ |
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 will remove this debug line "RUN ls -R $SRC/" :)
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.
Oops thank you!
This looks great as is, thanks for sending this. Will these targets benefit from having a seed corpus? The build.sh uses [maybe the least important] Another strategy is to have |
Looks like Botan builds are failing. One of your fuzzers seems to crash easily on startup, can you please fix that first. ref_rejected = 1 at 59:/src/botan/src/extra_tests/fuzzers/jigs/pkcs1.cpp NOTE: libFuzzer has rudimentary signal handlers. artifact_prefix='./'; Test unit written to ./crash-da39a3ee5e6b4b0d3255bfef95601890afd80709 |
Ok that error was fixed, now there is a new failure.
|
@kcc Sorry for delayed reply just saw this. Yes I need to work out seed corpus for at least cert, CRL, and TLS client/server, hopefully within next week or so. I will probably also take corpus generated from ClusterFuzz for some/all? of the others. As to your other comments, good suggestions all. I will change it so our fuzzers natively export the LLVM interface, and then the AFL adaptor main function (for local AFL use) can just call the LLVM fuzzer functions. And returning if the input is too long is clearer in fuzzer code and simplifies build on OSS-Fuzz side. |
Botan's fuzzers now have builtin maximums where necessary, instead of relying on max len option. So the code to generate the .options files goes. Suggested by @kcc in google#150 Use corpus for the common formats, seems to help with initial coverage at least. Disables Botan's pool allocator at build time, since it hides things from ASan. The fuzzer driver already tries to disable it at runtime in LLVMFuzzerInitialize, but the Clusterfuzz coverage report indicates that this init function is not ever called, and the pool allocator ends up being used.
Botan's fuzzers now have builtin maximums where necessary, instead of relying on max len option. So the code to generate the .options files goes. Suggested by @kcc in #150 Use corpus for the common formats, seems to help with initial coverage at least. Disables Botan's pool allocator at build time, since it hides things from ASan. The fuzzer driver already tries to disable it at runtime in LLVMFuzzerInitialize, but the Clusterfuzz coverage report indicates that this init function is not ever called, and the pool allocator ends up being used.
Have tested several of the fuzzers and everything seems to be working fine locally.