test(fuzz): capability flags fuzz target (FCV-10 #2428)#4475
Merged
Conversation
oferchen
added a commit
that referenced
this pull request
May 18, 2026
oferchen
added a commit
that referenced
this pull request
May 18, 2026
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.
Per FCV-3 audit (PR #4407) pre-auth gap recommendation: fuzz the capability-string parser.
Summary
fuzz/fuzz_targets/capability_flags.rscovering the pre-auth capability-flag parser surface inprotocol.CompatibilityFlags::read_from(varint reader off the wire)CompatibilityFlags::decode_from_slice/decode_from_slice_mut(slice + cursor variants)KnownCompatibilityFlag::from_str(canonicalCF_*identifier parser)detect_negotiation_prologue(pre-handshake byte sniff)NegotiationPrologue::from_str(identifier parser)CompatibilityFlagsbit patterns throughencode_to_vec+decode_from_sliceso encoder/decoder divergence surfaces as a panic.[[bin]]infuzz/Cargo.tomland seeds the corpus atfuzz/corpus/capability_flags/seed_basicwith the upstream rsync capability stringLsfxCIvu.negotiate_capabilitiesitself drives the full I/O exchange and is not a pure parser; its byte-level parser surface is reached through theCompatibilityFlagsdecoders covered here.Test plan
cargo +nightly fuzz run capability_flags -- -max_total_time=60