fuzzing: remove tar operations in alpine fuzzer #1322
Merged
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.
Signed-off-by: AdamKorcz adam@adalogics.com
Summary
This changes the alpine unmarshalling fuzzer to use an API in go-fuzz-headers that returns a list of flies instead of raw tar bytes: https://github.com/AdamKorcz/go-fuzz-headers-1/blob/9a8d8eeb7d896e8d217a4cfa3f44a6fe4ca7540f/consumer.go#L748. By using this API instead of
TarBytes
, we can avoid a series of expensive calls in the fuzzer that read and write to the tar bytes when the fuzzer checks and modifies the tar archives. With this change, the fuzzer becomes faster in creating valid tar archives before they are compressed and passed to the target API.github.com/AdamKorcz/go-fuzz-headers-1
is bumped becauseTarFiles
is a new API.Release Note
Documentation