Repository navigation
Conversation
Adds a cargo-fuzz workspace under node/fuzz with three targets, one per network-facing decoder: Bead, BeadRequest and BeadResponse. Each mirrors the call shape in BeadCodec, which reads a peer's bytes into a buffer and hands them to consensus_decode unmodified, so any panic a target finds is reachable by a remote peer. A README covers running them and adding more. Targets are kept thin, decode-only, so they can be retargeted as the core structures change. On its first run bead_response_decode surfaced an uncapped length-prefix preallocation in the vec decoders; that and the timestamp unwrap fixed in braidpool#548 are exactly the class this is meant to catch. Addresses braidpool#133.
Atishyy27
requested review from
Sansh2356,
mcelrath,
priyashuu and
zaidmstrr
as code owners
September 16, 2026 10:59
This was referenced Sep 16, 2026
Contributor
|
This is already on checklist but we should ideally wait for fuzzing to be introduced . |
Contributor
|
As told by Sansh2356, we haven't introduced the fuzz testing right now, but we will introduce this in the future for sure. Our current aim is to strengthen the other testing methodologies. I appreciate you created this PR but you can keep these changes in your local system until we have introduced the fuzz testing framework. |
This branch has not been deployed
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.
Adds a cargo-fuzz workspace under node/fuzz with one target each for Bead, BeadRequest and BeadResponse, decoding raw bytes the way a peer would send them. bead_response_decode found #550 on its first run. Fixes stay in their own PRs (#548, #552); this only adds the harness and a short README.
Relates to #133. cargo-fuzz needs nightly, so node/fuzz is its own workspace and stays out of the default build.
cargo fuzz run bead_response_decodehits #550 within a minute on dev.