-
Notifications
You must be signed in to change notification settings - Fork 44
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
Added fuzzer and oss-fuzz build-script #44
base: master
Are you sure you want to change the base?
Conversation
the integration files on the OSS-fuzz side have been added here: google/oss-fuzz#5085 |
Would be nice to get this merged |
I'd be generally OK with merging this, but I have some concerns. Could you add some kind of documentation, e.g. a README in this directory mentioning the OSS-fuzz project and its homepage? Mentioning it only in this PR will not be obvious to someone reading the code later. Does this need to be written in C++? I don't mind if the program is built with a C++ compiler, but I'd rather not introduce any actual C++ in the codebase. I don't see any use of the I'd suggest taking a look at Also, I don't think this works as-is; You have the line |
- removed use of <iostream>, std::remove - added an mspack_system that reads from memory and ignores all writes - if the cab file can be open()d, extract() is called on all files - add a README.md file explaining what this is
I've made all the changes I recommended above, you should find the fuzzer runs a lot faster now, and I'd be OK with merging this. Would you be able to continue with the other side and get libmspack integrated into oss-fuzz? |
Thanks! Yes, sure. Which email can we use for bug reports? |
|
Another thing is that this code is only checking CHM extraction. How would it be possible to register fuzzers also for:
These shoulld all have their own seed/example files, as they're all different file formats. In terms of code coverage, there should also be a fuzzer based on |
I have worked on setting up continuous fuzzing for libmspack, and this PR adds a fuzzer as well as the build script for oss-fuzz.
For those unfamiliar with fuzzing: Fuzzing is a way of testing software applications, whereby pseudo-random data is passed to a target application with the purpose of finding bugs and vulnerabilities. The fuzzer in this PR is implemented by way of libfuzzer.
OSS-fuzz is a project by Google that offers open source projects to integrate and have their fuzzers run continuously free of charge through regular, scheduled fuzz runs. While it is free, it is expected that founds bugs are fixed, so that the resources spent on fuzzing libmspack are put to good use.
The fuzzer creates a
.cab
file with the pseudo-random data, opens it and extracts it.I will shortly be setting up the integration files on the OSS-fuzz side, and to complete the integration, the files in this PR need to be merged, and a maintainers email address needs to be added over at OSS-fuzz for bug reports.