Formats: coverage-guided fuzz targets for the BCPack and XMA decoders #3311

Open
opened 2026-11-26 17:00:34 +00:00 by gabrielvbraga · 0 comments
gabrielvbraga commented 2026-11-26 17:00:34 +00:00 (Migrated from github.com)
Contributor

Imported from Marvisak/VIctory. Originally posted by gabrielvbraga on 2026-11-26T17:00:34Z.


victory-formats is pure bytes-in/bytes-out, so it can be fuzzed without game data. The existing noise_* tests feed a fixed xorshift stream and ignore the result; nothing is coverage-guided, and #3111 shows malformed input can still reach a panic (BC7 shift overflow).

Plan:

  1. Add a standalone fuzz/ crate (own [workspace], not part of the main build or CI) with cargo-fuzz targets for bcpack::Tables::parse (including mutated shipped tables), bcpack::decode, and the XMA packet/frame walk plus Decoder::decode.
  2. Run each target with overflow checks on, then open one issue and one focused PR per crash found, each with a regression test in the module's #[cfg(test)] block.

Taking this unless someone already has it.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6631496016 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/3311). Originally posted by [gabrielvbraga](https://github.com/gabrielvbraga) on 2026-11-26T17:00:34Z. --- victory-formats is pure bytes-in/bytes-out, so it can be fuzzed without game data. The existing `noise_*` tests feed a fixed xorshift stream and ignore the result; nothing is coverage-guided, and #3111 shows malformed input can still reach a panic (BC7 shift overflow). Plan: 1. Add a standalone `fuzz/` crate (own `[workspace]`, not part of the main build or CI) with cargo-fuzz targets for `bcpack::Tables::parse` (including mutated shipped tables), `bcpack::decode`, and the XMA packet/frame walk plus `Decoder::decode`. 2. Run each target with overflow checks on, then open one issue and one focused PR per crash found, each with a regression test in the module's `#[cfg(test)]` block. Taking this unless someone already has it.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory#3311
No description provided.