mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-11-26 23:30:44 +00:00
Issue #156 asks for a bounded, non-executing fuzz target for the CPU decoder. No public single-instruction decode API exists, so the target wraps up to 4096 fuzz bytes as the code section of a fixed, original PE32+ header and runs the public read-only probe_pe_bytes twice with a bounded ProbeConfig. It asserts identical reports, the 15-byte x86 instruction limit, and that each record lies in and matches the input. A startup self-check (nop; ret must decode to two records) stops a run whose synthetic header no longer reaches the decoder. A 600 s campaign found one decoder defect (unlimited segment prefixes give instructions over 15 bytes), reported on #74 and not fixed here. Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
49 lines
838 B
TOML
49 lines
838 B
TOML
[package]
|
|
name = "xenora-fuzz"
|
|
version = "0.0.0"
|
|
publish = false
|
|
edition = "2024"
|
|
license = "GPL-3.0-or-later"
|
|
|
|
[package.metadata]
|
|
cargo-fuzz = true
|
|
|
|
[dependencies]
|
|
libfuzzer-sys = "=0.4.13"
|
|
xenora-decoder = { path = "../crates/decoder" }
|
|
xenora-loader = { path = "../crates/loader" }
|
|
xenora-ref = { path = "../crates/ref" }
|
|
xenora-shader = { path = "../crates/shader" }
|
|
|
|
[workspace]
|
|
|
|
[[bin]]
|
|
name = "cpu_decode"
|
|
path = "fuzz_targets/cpu_decode.rs"
|
|
test = false
|
|
doc = false
|
|
|
|
[[bin]]
|
|
name = "instruction_stream"
|
|
path = "fuzz_targets/instruction_stream.rs"
|
|
test = false
|
|
doc = false
|
|
|
|
[[bin]]
|
|
name = "fixture"
|
|
path = "fuzz_targets/fixture.rs"
|
|
test = false
|
|
doc = false
|
|
|
|
[[bin]]
|
|
name = "pe_parse"
|
|
path = "fuzz_targets/pe_parse.rs"
|
|
test = false
|
|
doc = false
|
|
|
|
[[bin]]
|
|
name = "reference"
|
|
path = "fuzz_targets/reference.rs"
|
|
test = false
|
|
doc = false
|