CI: fuzz every fuzz crate - #23
Merged
Merged
Conversation
The fuzz job hardcoded `cd crates/tropic01-driver` before `cargo fuzz list`, in ci.yml and mirrored in ci-local.sh, so 2 of 8 targets had never run in any pipeline: `verify_image`, the firmware-image signature verifier, and `drive_machine`, which drives the update state machine. scripts/fuzz-gate.sh is now the single gate body both callers invoke, per the asm-gate.sh precedent. It walks the tree for fuzz projects and pins the expected crate list, failing both when a crate is discovered but not pinned and when a pinned crate is not found. Adding a fuzz crate means editing that file, which is deliberate: the old shape failed open and in silence. Three defects found on the way, each proven by re-injection. `cargo test --workspace` selected no features, so six `_fuzz` seam guard tests had never run anywhere. They now run in Test and Coverage, which blocks a merge. The `drive_machine` seam armed `MockSeCounter::new(0)`. The secure element counts down, so that pinned the anti-rollback floor at `u32::MAX` and rejected every image regardless of its signature. The driver's `verify_cert_chain` target gates its whole body on a fixed P-521 anchor parsing. One wrong byte and it consumed fuzzer input while doing nothing, coverage flat and the corpus collapsed, and the run still reported success. A test now pins that the anchor is accepted.
0xEthamin
force-pushed
the
ci/fuzz-gate-every-crate
branch
from
August 23, 2026 13:25
e57a2cb to
21a5665
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.
The fuzz job hardcoded
cd crates/tropic01-driverbeforecargo fuzz list, in ci.yml and mirrored in ci-local.sh, so 2 of 8 targets had never run in any pipeline:verify_image, the firmware-image signature verifier, anddrive_machine, which drives the update state machine.scripts/fuzz-gate.sh is now the single gate body both callers invoke, per the asm-gate.sh precedent. It walks the tree for fuzz projects and pins the expected crate list, failing both when a crate is discovered but not pinned and when a pinned crate is not found. Adding a fuzz crate means editing that file, which is deliberate: the old shape failed open and in silence.
Three defects found on the way, each proven by re-injection.
cargo test --workspaceselected no features, so six_fuzzseam guard tests had never run anywhere. They now run in Test and Coverage, which blocks a merge.The
drive_machineseam armedMockSeCounter::new(0). The secure element counts down, so that pinned the anti-rollback floor atu32::MAXand rejected every image regardless of its signature.The driver's
verify_cert_chaintarget gates its whole body on a fixed P-521 anchor parsing. One wrong byte and it consumed fuzzer input while doing nothing, coverage flat and the corpus collapsed, and the run still reported success. A test now pins that the anchor is accepted.