-
Notifications
You must be signed in to change notification settings - Fork 275
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
Fuzzing Coverage Expansion #407
Conversation
Thanks for improving our fuzz setup, we very much appreciate it. I haven't looked at it in detail yet, but could you please put the fuzzer specific files in their own directory? I would like to keep the regress directory for our test suite only. I would prefer a new top level directory, but if it's easier to integrate with the fuzz infrastructure, a subdirectory under regress is also acceptable. |
Hi @dillof But I don't have any access to oss-fuzz repo. |
Hi @dillof |
This pull request needs major cleanups.
|
Hi @0-wiz-0, @dillof asked me to create a new subdirectory under 'regress.' As a result, I have updated the shell script and also created a new subdirectory. Just to confirm, is it okay to move all the fuzzers directly to the 'regress' directory in this repository? I'm using corpuses as initial seeds for the fuzzers. According to the oss-fuzz documentation, the recommended approach is to zip the corpuses with the specific name 'name_seed_corpus.zip.' In the initial setup of the repository, you had created a zip file with all the corpuses in shell script, however I can archive them once and upload the prepared archive if you would like me to. |
@nmlsg Please take a step back and consider the existing project, not just the fuzzer part. The previous fuzzer setup just took advantage of the existing test data and used that. You added test data that is not zip archives (like pdf, php, js, xml), I'm not quite sure why (because libzip is not handling any of these formats), and put it unpacked in the regress directory. We saw that that as noise from the point of view of regression testing and asked you to put it in a subdirectory, or pack it up. Your latest change zipped them up, but also removed the test data we use for regression testing. Please, for future changes, make sure that the test suite runs through successfully. Here's an updated list of requests so this can be merged:
|
@0-wiz-0 I have cleaned up the 'regress' directory, removed 'C' source code from the top-level directory, restored the test data, and thoroughly documented the targets for the new fuzzers. Please take a moment to review these changes. Thank you. |
Thank you, that's better.
Thanks. |
@0-wiz-0 Thanks for your time ! I have pushed the changes, check it please !
|
Thank you for the changes.
|
|
Thank you for the improvements.
|
I appreciate your comments, and I'm thankful for your time and efforts.
|
Thank you for the information. Wow, you did set up your own fuzzing instance!
As for zip_read_fuzzer, I think I understand what you mean now - the new code tests if the file data that is provided can be read using zip_open() if written to a file. Thanks! |
Oh, and please take a look at the CIFuzz failure in the last run for the pull request. Are these alrady libzip fuzzing issues or problems in the setup? |
Hi @0-wiz-0 Based on my evaluation, the changes appear to be functioning as expected both locally and on my deployed machine, and there are no indications of issues with the ossfuzz setup in this pull request. I am considering the generation of new corpora that exclusively contain ASCII characters to replace the current ones. Would you like me to do it? |
@0-wiz-0 I have implemented all requisite modifications. Kindly review them at your earliest convenience. |
There were some minor things I cleaned up myself. |
@0-wiz-0 Thanks for your work, I really appreciate that ! |
Hello @0-wiz-0, I've observed that there might be an issue with the recent commit you made, which seems to have caused a breakdown in the OSS-Fuzz setup. Could you please consider rolling back this commit? Here is the latest log for reference: Link to Log. *Step #3 - "compile-libfuzzer-coverage-x86_64": [1m/src/libzip/regress/fuzzers/zip_write_encrypt_aes256_file_fuzzer.cc:70:1: [0m�[0;1;31merror: �[0m�[1mdeclaration of 'random_string' has a different language linkage�[0m I've also taken the initiative to test the setup locally with actual repository , and it has failed. Interestingly, when I tested my fork of the repository link, it worked perfectly fine, I assume that your last commit affected the whole setup. |
I've fixed the I have a local change that builds the fuzzers during a libzip build to find issues such as this one in the future, but this now needs a C++20 compiler, so I can't commit it as-is (because libzip is a C library). It would be nicer if the fuzzers were written in C instead of C++. |
This pull requests expands fuzzing coverage for oss-fuzz with new fuzzers and additional corpuses.