Repository navigation
Description
The gap
ci.yml's fuzz-smoke matrix names 10 fuzz targets. The repository has 22. The twelve that
are absent run only their committed seed corpus, as ordinary unit tests under go test — which
exercises a fixed handful of inputs and never mutates anything. So for those twelve, "we fuzz this"
is false.
Counted from the tree, not remembered:
$ grep -rh '^func Fuzz' --include='*_test.go' . | wc -l
22
$ grep -c '^ - {pkg:' <fuzz-smoke matrix>
10
Absent from the matrix
| Package | Target | Why it matters |
|---|---|---|
internal/storage/s3 |
FuzzWholeObjectResponse |
The checksum-verification decision. It decides whether a response is a whole object and therefore whether the SHA-256 gate runs at all. A false positive turns a valid partial read into a corruption error; a false negative silently skips verification |
internal/compression |
FuzzFramedRangeRead |
Frame-index parsing on the seekable-framing read path |
internal/cache |
FuzzChunkAssembly |
Reassembly of cached chunks into returned bytes |
internal/vfs |
FuzzXattrEncodingRoundTrip |
Attribute encode/decode against object metadata |
pkg/utils |
FuzzValidatePath |
Path validation — the traversal surface |
pkg/utils |
FuzzParseBytes |
Size-string parsing from operator configuration |
internal/distributed/hashring |
FuzzLookupIsStable |
Ring stability |
internal/awsname |
FuzzValidateBucketName |
|
internal/awsname |
FuzzParseStorageURI |
|
internal/awsname |
FuzzValidateSSEMode |
|
internal/awsname |
FuzzValidateKMSKeyID |
|
internal/awsname |
FuzzValidateStorageClass |
The first one is the one to be uncomfortable about. Integrity is this project's first priority, and
the function that decides whether the integrity check runs is the function CI does not fuzz.
Why it happened, and the shape of the fix
The matrix is an enumerated gate: a hand-maintained list of targets. A target added to the tree
does not join it, and nothing notices. This is the same failure mode as an enumerated file list — it
checks what its author knew at the time.
So the fix is two parts, and the second is the one that lasts:
- Add the twelve to the matrix.
- Assert the matrix is complete.
internal/configalready parsesci.yml(one parser now,
after Converge the two workflow YAML parsers in internal/config #504). A test that walks the tree for^func Fuzz, reads the matrix, and fails on a target
present in one and absent from the other makes step 1 un-regressable. Give it a non-vacuity floor
so an empty walk cannot pass — the patternjob_timeouts_test.gouses.
Step 2 without step 1 is a red build; do both in one change.
Budget
60s per target is the existing budget and is defensible for a per-PR gate. Twelve more targets at 60s
is twelve more matrix cells, which run in parallel — wall-clock cost is roughly zero, runner-minute
cost is twelve minutes per run. If that is too much, the alternative is a separate scheduled job with
a longer budget, but do not let the budget question block adding the targets: a 60-second fuzz of
FuzzWholeObjectResponse is strictly more than the zero it gets today.
Acceptance criteria
- All 22 targets are fuzzed by CI
- A test in
internal/configfails when a^func Fuzztarget in the tree is missing from the matrix - That test has a non-vacuity floor on the number of targets discovered
- Mutation-verified: add a throwaway fuzz target, confirm the new test names it, remove it
- Any counterexample found while adding these is committed to
testdata/fuzz/and fixed
Activity
scttfrdmn commentedon Sep 30, 2026
Ran all twelve at 180s each. Two of them had real defects, found in 1 and 6 seconds.
This is no longer a hypothetical gap. Campaign results, 180s budget per target through
.github/scripts/fuzz-smoke.sh:FuzzWholeObjectResponseFuzzFramedRangeReadFuzzChunkAssemblyFuzzXattrEncodingRoundTripFuzzValidatePathFuzzParseBytesFuzzLookupIsStableFuzzValidateBucketNameFuzzParseStorageURIFuzzValidateSSEModeFuzzValidateKMSKeyIDFuzzValidateStorageClassBoth are fixed in #571, with the counterexamples committed as seed corpus.
What the timings say
Seven seconds of combined runtime for two real defects. These were not deep, rare states reached
after millions of executions — a fuzzer hit both almost immediately. That is the signature of code that
was described as guarded rather than guarded:
bucketNameForbiddenBytesenumerated six control bytesunder a comment claiming the whole category, and
ValidateKMSKeyIDhad no such check at all.It also means the counterfactual is stark. Had these two targets been in the matrix at the existing
60-second budget, CI would have failed on the commit that introduced each defect. The targets were
already written. The properties were already stated correctly. The only missing piece was a matrix row.
What it says about the ten clean ones
Ten targets surviving 180s is genuinely reassuring and should be read as such — but note the asymmetry
it exposes. The four packages with a committed
testdata/fuzz/corpus are all in CI's matrix; the onesabsent from it (
internal/compression,internal/vfs,pkg/utils,internal/distributed/hashring) had no corpus directory at all, because a target that has neverfound anything has nothing to commit. An empty corpus directory looked exactly like a well-tested
target.
Bearing on the proposed fix
This strengthens the case for part 2 over part 1. Adding twelve rows is a one-time correction; the
completeness test is what stops the thirteenth target from joining the list silently. Recommend keeping
both in scope and not letting the budget question delay either — 60s would have caught both of these.
fix(awsname): reject control characters by category, not by enumerati…
fix(awsname): ValidateBucketName is an allow-list, closing the deny-l…
fix(ci): fuzz-smoke fuzzes all 22 targets, and a test keeps the matri…
test(config): requiredChecks transcribes the 12 fuzz-smoke cells bran…