ossfuzz: add zip_write_alt_compress_fuzzer for bzip2/zstd/xz codec paths#539
Open
XananasX7 wants to merge 2 commits into
Open
ossfuzz: add zip_write_alt_compress_fuzzer for bzip2/zstd/xz codec paths#539XananasX7 wants to merge 2 commits into
XananasX7 wants to merge 2 commits into
Conversation
ba8cf1c to
6025b43
Compare
6025b43 to
a260f11
Compare
Contributor
Author
|
The AppVeyor build failures are on Visual Studio 2019 (MSVC 16) Windows jobs and appear to be infrastructure-related (the base |
Contributor
Author
|
Friendly ping — happy to address any review comments. Thank you! |
Member
|
Thanks for your contribution. On first glance there might be a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The existing
zip_write_roundtrip_fuzzerexercises onlyZIP_CM_STOREandZIP_CM_DEFLATE. libzip also supports three additional compression codecs that are not covered by any current OSS-Fuzz harness:ZIP_CM_BZIP2(12)lib/zip_algorithm_bzip2.cZIP_CM_ZSTD(93)lib/zip_algorithm_zstd.cZIP_CM_XZ/ZIP_CM_LZMA(95/14)lib/zip_algorithm_xz.cNew harness:
zip_write_alt_compress_fuzzerPerforms a full write → read-back roundtrip for each codec:
zip_source_buffer_createzip_set_file_compression()with a fuzz-chosen method + level (0–9)zip_close()to trigger actual compressionThis covers codec
allocate(),input(),process(),output(), anddeallocate()callbacks in all three codec files, plus error propagation paths through bzip2/zstd/lzma stream handling.Testing
Compiles cleanly against libzip HEAD (
clang -fsyntax-only).