Repository navigation
fuzz: add sync/archive coverage harness and enable zstd - #275
Open
AdetsGithub wants to merge 3 commits into
Open
AdetsGithub wants to merge 3 commits into
AdetsGithub wants to merge 3 commits into
Conversation
Exercise ca_sync encode/decode, chunk stores, and compressor round-trips so coverage reaches beyond the existing decompress-only driver. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Feed attacker-controlled archive bytes into ca_sync decode via raw, template-mutation, and structured CA_FORMAT_* TLV strategies so the fuzzer targets parser/security surface rather than well-formed round-trips alone. Co-authored-by: Cursor <cursoragent@cursor.com>
Author
|
Added a second harness,
|
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
test/fuzz/fuzz-sync.c, a libFuzzer harness that exercisesca_syncencode/decode (.catar/.caidx/.caibx), chunk-store paths, compressor encode/decode round-trips for xz/gzip/zstd, and related utility helpers.test/fuzz/meson.buildand ship a tiny seed undertest/fuzz/fuzz-sync/.-Dlibzstd=enabledintools/oss-fuzz.shso the zstd compressor paths are built in OSS-Fuzz (libzstd-dev is already in the project Dockerfile).The existing
fuzz-compressdriver only starts a decoder from a random algorithm byte, so most of the archive/sync and compressor encode surface stays cold. This harness drives the higher-level sync API and supported compressors to broaden coverage.Test plan
meson setup build -Dllvm-fuzz=true -Dlibzstd=enabled -Dman=false && ninja -C build fuzzers(or OSS-Fuzzcompile)./build/fuzz-sync -runs=1000(or equivalent under OSS-Fuzz) and confirm no immediate crashes/assertsfuzz-compressandfuzz-syncare produced and packaged with seed corporacompressor_is_supported(CA_COMPRESSION_ZSTD))Made with Cursor