diff --git a/crates/sfbinpack/RUSTSEC-0000-0000.md b/crates/sfbinpack/RUSTSEC-0000-0000.md new file mode 100644 index 0000000000..b0953aa177 --- /dev/null +++ b/crates/sfbinpack/RUSTSEC-0000-0000.md @@ -0,0 +1,24 @@ +```toml +[advisory] +id = "RUSTSEC-0000-0000" +package = "sfbinpack" +date = "2026-05-02" +url = "https://github.com/Disservin/binpack-rust/issues/17" +informational = "unsound" +categories = ["memory-corruption"] +keywords = ["out-of-bounds"] + +[versions] +patched = [] +``` + +# Out-of-bounds read via `BitReader` in `CompressedTrainingDataEntryReader` + +`CompressedTrainingDataEntryReader` constructs a `BitReader` from a raw +pointer without tracking length. A crafted chunk with `num_plies > 0` but no +movetext bytes triggers out-of-bounds reads via the `BitReader`, which uses +`*self.movetext.add(self.read_offset)` without bounds checks. + +This can be triggered through safe public APIs — +`CompressedTrainingDataEntryReader::new()` and `.next()` — with no `unsafe` +required from the caller. \ No newline at end of file