Repository navigation
cargo-fuzz: new package (0.13.2) - #1614
Merged
Merged
Conversation
libFuzzer-driven fuzzing for Rust, built from source with the stable rust package (--locked fetch, --frozen build under detbuild, remap-path-prefix). Ships no toolchain: it drives the nightly cargo on PATH (rust-nightly-charon for the fv-lab loadout). Runtime deps glibc + libgcc. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Warning Review limit reached
This review includes 2 billable files and costs up to $0.50.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 17 minutes for your next included review. View limit details
|
norrietaylor
approved these changes
Nov 21, 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.
New package
cargo-fuzz0.13.2 (rust-fuzz/cargo-fuzz) for the fv-lab loadout.Package
rustpackage, following the cargo-mutants pattern (cargo-mutants 27.1.0 (new): mutation testing for Rust (fv-lab) #1609):cargo fetch --lockedagainst upstream's Cargo.lock, thencargo build --frozenunderdetbuild, withcodegen-units=1, v0 mangling and--remap-path-prefix. Source is the tag archive mirrored create-only togs://minimal-staging-archives/rust-fuzz/cargo-fuzz/0.13.2.tar.gz(sha25688e17980…6f46).glibc+subsetOf gcc ["libgcc"]. build.sh fails closed if the binary NEEDs anything else; it NEEDslibgcc_s.so.1andlibc.so.6.cargo/rustcon PATH, which must be a nightly (it passes-Zsanitizer). For fv-lab that isrust-nightly-charon, so the loadout still has exactly one cargo.What the loadout needs alongside it
rust-nightly-charon(or another nightly). Its rust-std has the sanitizer runtimes on both arches. I listed the mirrored 2026-09-17 rust-std tarballs:librustc-nightly_rt.{asan,lsan,msan,tsan}.a, plus ubsan, rtsan, safestack, dfsanlibrustc-nightly_rt.{asan,lsan,msan,tsan}.a, plus ubsan, rtsan, hwasanlib/rustlib/aarch64-unknown-linux-gnu/lib/.toolchain(gcc + binutils + headers). libfuzzer-sys compiles libFuzzer's C++ with thecccrate when you fuzz (c++, libstdc++), and rustc needs a linker.CARGO_TARGET_<TRIPLE>_LINKER=gcc(for exampleCARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=gcc, or the x86_64 one). gcc ships nocclink (seepackages/gcc/build.sh), andccis rustc's default linker on linux-gnu. Without the override, the first build script fails withlinker `cc` not found. Appending-C linker=gcctoRUSTFLAGSalso works, because cargo-fuzz appends the user's RUSTFLAGS.-s threadneeds--build-std, which works because charon's nightly ships rust-src. Without it the current nightly rejects the sanitizer ABI mismatch with the prebuilt std.-s memoryturns on build-std by itself.Verification
min package build --rebuild --verbose cargo-fuzzon arm64: build finished.min check --packages cargo-fuzzpasses every check, standalone tests included.version_checkrunscargo fuzz --version.init_listrunscargo fuzz init+cargo fuzz liston a one-function crate withrust-nightly-charon. Nothing is compiled, because libfuzzer-sys would have to come from crates.io and the test sandbox has no network.cargo-fuzz 9.9.9, targetnope), both tests fail.cargo-fuzz rust-nightly-charon toolchain ca-certificates …:cargo fuzz run parse -- -runs=1000(ASan, the default):Done 1000 runs. The binary has the asan + sancov symbols.ERROR: AddressSanitizer: heap-buffer-overflowis reported.-s leak,-s memoryand-s nonebuild and run.-s thread --build-stdbuilds and runs, and ThreadSanitizer reports the injected bug.linker `cc` not found(item 3 above).🤖 Generated with Claude Code