git: add 5 harnesses for object parsing, fsck, and refname format#51
Open
tc-agent wants to merge 2 commits into
Open
git: add 5 harnesses for object parsing, fsck, and refname format#51tc-agent wants to merge 2 commits into
tc-agent wants to merge 2 commits into
Conversation
Fuzzing Coverage ReportTested: project
Δ = (after − before) / before, to accommodate that denominators may change. "new" when before is 0; "deleted" when after is 0. |
tc-agent
force-pushed
the
master
branch
3 times, most recently
from
May 9, 2026 05:22
dae1a9a to
1161025
Compare
tc-agent
force-pushed
the
update-git-fuzzing-add-object-parsing-and-fsck-harnesses
branch
from
May 9, 2026 05:22
e7b84ee to
52ccbf1
Compare
tc-agent
force-pushed
the
master
branch
2 times, most recently
from
May 9, 2026 05:47
c655e12 to
8504e1c
Compare
tc-agent
force-pushed
the
update-git-fuzzing-add-object-parsing-and-fsck-harnesses
branch
from
May 9, 2026 05:47
52ccbf1 to
2988483
Compare
tc-agent
force-pushed
the
update-git-fuzzing-add-object-parsing-and-fsck-harnesses
branch
from
May 9, 2026 06:12
2988483 to
d666ad7
Compare
tc-agent
force-pushed
the
master
branch
3 times, most recently
from
May 9, 2026 17:27
6c52918 to
0c732ae
Compare
tc-agent
force-pushed
the
master
branch
14 times, most recently
from
May 11, 2026 09:29
c9e2044 to
177029d
Compare
tc-agent
force-pushed
the
master
branch
15 times, most recently
from
May 21, 2026 13:42
9a36aa8 to
6a4a93d
Compare
tc-agent
force-pushed
the
master
branch
3 times, most recently
from
May 27, 2026 06:33
6125235 to
e512e7e
Compare
tc-agent
force-pushed
the
update-git-fuzzing-add-object-parsing-and-fsck-harnesses
branch
from
May 27, 2026 07:54
d666ad7 to
1745512
Compare
tc-agent
force-pushed
the
master
branch
7 times, most recently
from
May 28, 2026 02:55
a7587cd to
b952f62
Compare
tc-agent
force-pushed
the
update-git-fuzzing-add-object-parsing-and-fsck-harnesses
branch
from
May 28, 2026 04:09
1745512 to
679de46
Compare
tc-agent
force-pushed
the
master
branch
2 times, most recently
from
May 28, 2026 15:52
02e947d to
53588b3
Compare
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.
Add five new fuzz harnesses targeting central git parsing surfaces that the existing harness set does not exercise.
Baseline
Per Fuzz Introspector (May 7, 2026 build): 1.98% line coverage (2,514 / 126,869) across the 8 existing harnesses, none of which individually exceeds 0.79%.
New harnesses
fuzz-parse-commitparse_commit_buffer()commit.hfuzz-parse-tagparse_tag_buffer()tag.hfuzz-tree-walkinit_tree_desc_gently()+tree_entry_gently()tree-walk.hfuzz-fsckfsck_buffer()for all four object typesfsck.hfuzz-refnamecheck_refname_format()with three flag combinationsrefs.hfuzz-fsckuses the first input byte (mod 4) to select the object type so a single harness exercises commit, tree, blob, and tag validation. The remainder of the buffer is the object body.fuzz-refnameinvokes the validator three times per input — bare, withREFNAME_ALLOW_ONELEVEL, and withREFNAME_REFSPEC_PATTERN— so each input touches all three branches of the flag matrix.The four object-parsing harnesses initialize a clean repository, set the SHA-1 hash algorithm, run the parser, and clear the repository. This pattern matches the existing
fuzz-commit-graphharness.Build integration
The harness
.cfiles are copied into the upstreamoss-fuzz/directory of the git source tree bybuild.shso the existingfuzz-allmake target compiles and links them with the correctEXTLIBS(pcre2, z, curl, ssl, …). NewFUZZ_OBJSlines are inserted into the Makefile just after the existingfuzz-url-decode-mem.oentry.Seed corpora
Each new harness ships a small text-or-script-generated seed corpus (
seeds/<harness>/), packaged as<harness>_seed_corpus.zip. Seeds are produced byseeds/gen_seeds.pyto keep the diff human-auditable. Each seed exercises a distinct parser branch (commit minimal vs with parent; tag of commit vs tree vs blob; tree single vs multi-entry vs special modes; per-type fsck dispatch; refname flag-bearing forms).Coverage after 5 minutes per harness (libfuzzer, ASan)
Locally measured against git source at the current
master(denominator 126,939 lines, in the same ballpark as Fuzz Introspector's 126,869):fuzz-parse-commit(new)fuzz-parse-tag(new)fuzz-tree-walk(new)fuzz-fsck(new)fuzz-refname(new)fuzz-configfuzz-credential-from-url-gentlyfuzz-datefuzz-pack-headersfuzz-pack-idxfuzz-parse-attr-linefuzz-url-decode-memfuzz-commit-graphThe combined coverage of 2.98% is +1.0 percentage point over the Fuzz Introspector baseline (1.98%), driven entirely by the new harnesses.