[bzip2] Stream decompressor output and export seed corpus - #15944
Open
carrerasdarren-cell wants to merge 1 commit into
Open
[bzip2] Stream decompressor output and export seed corpus#15944carrerasdarren-cell wants to merge 1 commit into
carrerasdarren-cell wants to merge 1 commit into
Conversation
|
carrerasdarren-cell is a new contributor to projects/bzip2. The PR must be approved by known contributors before it can be merged. The past contributors are: OwenSanzas, arthurscchan, hunsche, fanquake, swirsz, cvediver, Dor1s, sylvestre, posidron (unverified), bshastry (unverified), tysmith (unverified) |
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
$OUTso OSS-Fuzz retains itRationale
BZ2_bzBuffToBuffDecompresscurrently receives an output capacity of2 * input_size. Valid bzip2 streams can expand far beyond that ratio, so the target returnsBZ_OUTBUFF_FULLbefore exercising the rest of the stream. All three upstream quick-test samples exceed the current limit:sample1.bz2sample2.bz2sample3.bz2A deterministic 1 MiB zero-filled input compresses to 45 bytes. The old 90-byte output buffer returns
BZ_OUTBUFF_FULL(-8); the streaming path reachesBZ_STREAM_END(4) after producing all 1,048,576 bytes.The build script also creates
bzip2_decompress_target_seed_corpus.zipin the container working directory aftercd bzip2, rather than in$OUT. The archive is therefore absent from the build artifacts.Verification
python3 infra/helper.py build_fuzzers bzip2 --sanitizer address --cleanpython3 infra/helper.py build_fuzzers bzip2 --sanitizer undefinedpython3 infra/helper.py check_build bzip2 --sanitizer undefinedFor a deterministic
-runs=0replay of the same exported corpus, the old target initialized at 450 edges / 1,344 features; the streaming target initialized at 464 edges / 1,574 features.