# cargo-fuzz workspace for the OFFLINE derivation surface. Every target feeds fully # attacker-controlled bytes (a Valve `.so`, or a fuzzer mutation of one) to the ELF/schema/RTTI/abi/ # sig readers and asserts the tool never PANICS — only returns Err/None. This earns the "degrades, # never crashes" half of the robustness guarantee: a future build with an unusual layout must reduce # the gamedata, not abort CI. Run: cd source2rosetta/fuzz && cargo +nightly fuzz run fuzz_elf [package] name = "source2rosetta-fuzz" version = "0.0.0" publish = false edition = "2024" license = "AGPL-3.0-only" repository = "https://git.lo.sh/kamal/source2rosetta" authors = ["kamal"] [workspace] [package.metadata] cargo-fuzz = true [dependencies] libfuzzer-sys = "0.4" [dependencies.source2rosetta] path = ".." # Seeds are generated in-process (no committed Valve bytes) — see gen_corpus.rs. [[bin]] name = "gen_corpus" path = "gen_corpus.rs" test = false doc = false bench = false [[bin]] name = "fuzz_elf" path = "fuzz_targets/fuzz_elf.rs" test = false doc = false bench = false [[bin]] name = "fuzz_schema" path = "fuzz_targets/fuzz_schema.rs" test = false doc = false bench = false [[bin]] name = "fuzz_rtti" path = "fuzz_targets/fuzz_rtti.rs" test = false doc = false bench = false [[bin]] name = "fuzz_sig_abi" path = "fuzz_targets/fuzz_sig_abi.rs" test = false doc = false bench = false [[bin]] name = "fuzz_xref" path = "fuzz_targets/fuzz_xref.rs" test = false doc = false bench = false