hostap: enrich fuzzing seed corpora#66
Open
tc-agent wants to merge 2 commits into
Open
Conversation
tc-agent
force-pushed
the
master
branch
2 times, most recently
from
May 27, 2026 08:56
436120a to
baaf8ab
Compare
| if isinstance(data, str): | ||
| data = data.encode() | ||
| with open(os.path.join(corpus_dir, name), "wb") as f: | ||
| f.write(data) |
Fuzzing Coverage ReportTested: project
Per-harness
Δ = (after − before) / before, to accommodate that denominators may change. "new" when before is 0; "deleted" when after is 0. |
Owner
Author
|
noop-probe |
tc-agent
force-pushed
the
master
branch
2 times, most recently
from
May 27, 2026 16:16
b5fd10c to
712a52f
Compare
tc-agent
force-pushed
the
update-hostap-fuzzing-seeds
branch
from
May 27, 2026 16:43
4e03262 to
d3f606f
Compare
tc-agent
force-pushed
the
master
branch
6 times, most recently
from
May 28, 2026 18:05
af7f9a7 to
806b281
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.
What
hostap ships 19 in-tree libFuzzer targets under
tests/fuzzing/(X.509/ASN.1,TLS, EAP-SIM/AKA/MSCHAPv2, EAPOL, RADIUS, SAE, P2P/WNM/PASN, 802.11 mgmt).
Each target only ships a 1–5 input example corpus in
tests/fuzzing/*/corpus/, so a run spends most of its budget rediscoveringbasic structure before reaching the parsers of interest.
This change enriches the seed corpora at build time, without modifying any
harness or upstream source:
seeds/gen_seeds.py(new): emits structured seeds assembled field-by-fieldfrom the relevant RFC / IEEE 802.11 / hostap wire formats (JSON, DPP URI,
RADIUS, SAE commit, framed EAP-SIM/AKA/MSCHAPv2, EAPOL, P2P/WNM IEs, full
802.11 management-frame exchanges).
build.sh: runs the generator, and converts the X.509 certificates, CSRs,CRLs and PKCS#8/bind9: fix broken build #12 keys already present in
tests/hwsim/auth_serv/to DER,adding them to the
x509/asn1corpora.Dockerfile:COPY seeds \$SRC/seeds.Existing example inputs are preserved; only generated/derived inputs are
added. No binary blobs are committed — every seed is produced from readable
code or from material already in the tree.
Measured impact
Baseline coverage for the existing harness set is tracked by Fuzz
Introspector (long-running production fuzzing):
https://introspector.oss-fuzz.com/project-profile?project=hostap — 18.30%
line coverage (25,218 / 137,773).
Measured locally on a clean
build_fuzzers(no local source):rises from `cov: 17` (2 upstream example inputs) to `cov: 199` using only
the in-tree certificates converted to DER — and higher with the generated
seeds added.
enriched corpora, reaches 16.8% aggregate line coverage
(23,118 / 137,810) — i.e. ~92% of the long-running production figure is
reached within five minutes from a cold start, versus a substantially
lower figure with the upstream example corpora alone.
This is a corpus-quality improvement: it lets the existing targets reach
deep parser state quickly. It does not change the reachable surface, so it
does not raise the long-run production ceiling; it shortens the time to
reach it.
Testing
`python3 infra/helper.py build_fuzzers hostap` succeeds on a clean clone and
produces the enriched `*_seed_corpus.zip` for every target. A 5-minute
`run_fuzzer` pass over all 19 targets completed with no crashes.