Repository navigation
Fuzz targets for the wire format, startup lines, fragments and the TCP stack - #62
Merged
Merged
Conversation
…P stack cargo-fuzz (nightly) in its own workspace under fuzz/: - frame: frame::parse in any chunk size, then every payload decoder. - handshake: read_banner and read_hello on hostile server output. - ipfrag: Reassembler::add and fragment, on crafted IPv4 fragments. - tcp_stack: the vendored ipstack, configured as tun mode does, fed TCP segments whose numbers track the stack's own. Run one with: cargo +nightly fuzz run frame
On pull requests and pushes that touch the code a target covers, and weekly. A crash fails the job and uploads its input. CONTRIBUTING.md says how to run the targets locally.
allwinpower
enabled auto-merge (squash)
October 28, 2026 17:55
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.
cargo-fuzz targets for the input a hostile server or a local app controls, in their own workspace under
fuzz/, and a CI workflow that runs each for 60 seconds.frameframe::parseon bytes in any chunk size, then every payload decoder (Hello,Addr, u32/u64, CONNECT_ERR)handshakeread_bannerandread_helloon hostile server outputipfragReassembler::addon crafted IPv4 fragments, thenfragmenton the resulttcp_stackstack_configintunmode.rs, fed TCP segments whose sequence numbers track the stack's own, so inputs get past the handshakeipfragfinds the crash fixed in GHSA-2c7x-2cp2-g77m within a second on 0.3.0. On main, 10-minute runs found nothing:frame6.6 million inputs,handshake12.6 million,ipfrag3.9 million,tcp_stack64 thousand.tcp_stackuses a multi-threaded runtime: the vendored stack'sDrop for IpStackTcpStreamwaits for its session task withblock_in_place, which a current-thread runtime does not allow. Upstream ipstack no longer blocks there (narrowlink/ipstack 0f95edc).fuzz.yml runs on pull requests and pushes that touch
crates/core,crates/client/src/ipfrag.rs,third_party/ipstackorfuzz/, and weekly. It is not a required check, so a nightly toolchain problem cannot block merges. A crash uploads its input as an artifact.CONTRIBUTING.md gets a Fuzzing section. Checked: actionlint and zizmor (medium and up) clean; all four targets run 20 seconds on current main with no crash.