Repository navigation
test(fuzz): vstring parser fuzz target (FCV-14 #2441) - #4486
Merged
Merged
Conversation
The vstring codec is exchanged during protocol 30+ capability negotiation, well before authentication completes, making any panic in the reader a pre-auth remote attack surface (FCV-3 audit, PR #4407). Add a libFuzzer target that drives `read_vstring` through the public `negotiate_capabilities` entry point, with a selector byte that fans out across protocol versions and role flags so both the one-byte and two-byte length encodings and the UTF-8 validation path are exercised. Register the new bin in fuzz/Cargo.toml and seed the corpus with a known-good vstring.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
The vstring codec is exchanged during protocol 30+ capability negotiation, well before authentication completes, making any panic in the reader a pre-auth remote attack surface (FCV-3 audit, PR #4407). Add a libFuzzer target that drives `read_vstring` through the public `negotiate_capabilities` entry point, with a selector byte that fans out across protocol versions and role flags so both the one-byte and two-byte length encodings and the UTF-8 validation path are exercised. Register the new bin in fuzz/Cargo.toml and seed the corpus with a known-good vstring.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
The vstring codec is exchanged during protocol 30+ capability negotiation, well before authentication completes, making any panic in the reader a pre-auth remote attack surface (FCV-3 audit, PR #4407). Add a libFuzzer target that drives `read_vstring` through the public `negotiate_capabilities` entry point, with a selector byte that fans out across protocol versions and role flags so both the one-byte and two-byte length encodings and the UTF-8 validation path are exercised. Register the new bin in fuzz/Cargo.toml and seed the corpus with a known-good vstring.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
The vstring codec is exchanged during protocol 30+ capability negotiation, well before authentication completes, making any panic in the reader a pre-auth remote attack surface (FCV-3 audit, PR #4407). Add a libFuzzer target that drives `read_vstring` through the public `negotiate_capabilities` entry point, with a selector byte that fans out across protocol versions and role flags so both the one-byte and two-byte length encodings and the UTF-8 validation path are exercised. Register the new bin in fuzz/Cargo.toml and seed the corpus with a known-good vstring.
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) - vstring is pre-auth attack surface.
Summary
fuzz/fuzz_targets/vstring.rs, a libFuzzer target that drives the protocol 30+ vstring reader through the publicnegotiate_capabilitiesentry point.fuzz/Cargo.tomland seeds the corpus with a known-good vstring.Coverage
read_vstring/write_vstringlive incrates/protocol/src/negotiation/capabilities/negotiate.rsand arepub(super). They are reached from outside the crate exclusively throughnegotiate_capabilities, which feeds the caller-supplied reader into the vstring decoder. A selector byte at the head of the fuzz input fans out across protocol versions (28/30/31/32) and role/mode flags (do_negotiation,send_compression,is_daemon_mode,is_server) so libFuzzer can independently explore the one-byte and two-byte length encodings and the UTF-8 validation path.Test plan
cargo fmt --all -- --check(fuzz package)cargo +nightly fuzz run vstring(manual smoke run)