Add libFuzzer harnesses for the HTTP header and cache-index parsers (reland) - #509
Merged
Conversation
P3-5 fuzz Tier-2. Two more harnesses over hostile-input parsers that read structured bytes into fixed buffers: fuzz-header drives treatfirstline plus treathead on each response-header line (the Content-Type/-Encoding path hardened in #506, and the cookie/Location/Content-Range fields); fuzz-cachendx drives the hts-cache/*.ndx length-prefixed scan that cache_readex_new loads on --update. fuzz-cachendx found the over-advance fixed in the parent commit; its seed corpus carries the two crash reproducers as replay regressions. The cache harness stops at the scan rather than the trailing coucal insert, whose murmur hash trips a separate pointer-overflow the .ndx parser does not own. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
fuzz-header.c and fuzz-cachendx.c are new in the 2026 audit cycle; match the sibling *_selftest.c files rather than the boilerplate 1998. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
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.
Relands #508 unchanged. It was merged while still targeting #507's branch, so its commit landed on fix-cache-ndx-oob rather than master and the harnesses never reached the tree. Review history is in #508; the leftover fix-cache-ndx-oob branch can be deleted once this lands.