Skip to content

Add libFuzzer harnesses for the pure hostile-input parsers - #500

Closed
xroche wants to merge 1 commit into
fix-parser-fuzz-bugsfrom
p3-1-fuzzers
Closed

Add libFuzzer harnesses for the pure hostile-input parsers#500
xroche wants to merge 1 commit into
fix-parser-fuzz-bugsfrom
p3-1-fuzzers

Conversation

@xroche

@xroche xroche commented Jul 7, 2026

Copy link
Copy Markdown
Owner

A fuzz/ tree with one libFuzzer harness per pure (buf, size) parser that ingests network bytes: the charset, UTF-8, and IDNA codecs, the <meta> charset scan, the entity and URL percent decoders, the filter matcher, and the URL splitter. It sits behind --enable-fuzzers (needs clang, forces --disable-shared), so a normal build is untouched.

A CI job builds them under ASan, UBSan, and LeakSanitizer and replays each seed corpus. Replaying keeps it deterministic and avoids strjoker's catastrophic backtracking, tracked in #501. The corpora carry the reproducers for the four parser bugs found here, so the job pins those regressions.

Stacked on #499; merge that one first.

@xroche
xroche force-pushed the fix-parser-fuzz-bugs branch from 6568124 to 8b676d4 Compare July 7, 2026 06:42
@xroche
xroche force-pushed the p3-1-fuzzers branch 2 times, most recently from 397ee59 to 96949b2 Compare July 7, 2026 06:44
@xroche
xroche force-pushed the fix-parser-fuzz-bugs branch from 8b676d4 to 559c88f Compare July 7, 2026 07:03
@xroche
xroche force-pushed the fix-parser-fuzz-bugs branch from 559c88f to c675050 Compare July 7, 2026 13:15
@xroche
xroche force-pushed the p3-1-fuzzers branch 2 times, most recently from dcd38fe to b039e22 Compare July 7, 2026 16:02
New fuzz/ tree with a libFuzzer harness per pure (buf,size) parser that ingests
network-sourced bytes: the charset/UTF-8/IDNA codecs, the HTML <meta> charset
scan, HTML entity and URL percent decoders, the wildcard filter matcher, and
the URL splitter. Gated behind --enable-fuzzers (requires clang, forces
--disable-shared so clang's static sanitizer runtimes link); a normal build is
untouched.

A CI job builds the harnesses under ASan+UBSan+LeakSanitizer and replays each
seed corpus. Replay, not open-ended mutation, keeps the job deterministic and
avoids strjoker's catastrophic backtracking (a data-dependent exponential in
the wildcard matcher, tracked separately). Maintainers run the timed mutation
mode locally for discovery; OSS-Fuzz is the next step.

The corpora carry the reproducers for the four parser bugs these harnesses
found, so the job also pins those regressions. It depends on the fixes in the
preceding commit; merge that first.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
@xroche
xroche force-pushed the fix-parser-fuzz-bugs branch from c675050 to 9a63b4a Compare July 7, 2026 16:05
@xroche
xroche deleted the branch fix-parser-fuzz-bugs July 7, 2026 16:14
@xroche xroche closed this Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant