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

Open
opened 2026-11-26 17:03:23 +00:00 by github-bot · 0 comments
Owner

@⁠gabrielvbraga on GitHub · 2026-11-26 17:00 UTC · original

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.

**@⁠gabrielvbraga** on GitHub · 2026-11-26 17:00 UTC · [original](https://github.com/Marvisak/VIctory/issues/3311) 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 17:03:23 +00:00
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#3311
No description provided.