XMA: reject frame starts in packet headers #1797

Open
github-bot wants to merge 2 commits from github-bot/gh-1797 into main AGit
Owner

@⁠VlREX on GitHub · 2026-11-24 22:45 UTC · original
VlREX:fix/xma-frame-payload-start → main · +25 −4 · 1 files · 2 commits · open

No description provided.

**@⁠VlREX** on GitHub · 2026-11-24 22:45 UTC · [original](https://github.com/Marvisak/VIctory/pull/1797) `VlREX:fix/xma-frame-payload-start` → `main` · +25 −4 · 1 files · 2 commits · open *No description provided.*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:44:55 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:36 UTC · original · edited 2026-11-25 20:23 UTC

Automated triage for the maintainers.

Merge candidate. The new commit 673efe6 follows the previous review's suggestion. It drops the rejection of frame starts inside a packet header from read_frame (crates/victory-formats/src/xma.rs), along with its test, so a start at a packet boundary is again stepped over by Cursor as on main. What remains is the padding-marker fix: next_frame's walk from the packet's first frame now stops at a 0x7fff length, the same rule read_frame already applies. On main the walk would add 32767 bits, overshoot start, and count a frame that isn't there.

Tests:

  • padding_marker_before_start_ends_the_search gives next == None here. On main, reading the same data jumps to the next packet, so the test tells the two versions apart.
  • truncated_frame_and_out_of_range_starts_are_rejected pins behaviour Cursor already has.

This only matters for streams where a padding marker comes before a frame start in the same packet, which is damaged data. One thing before merging: the PR title still says "reject frame starts in packet headers", which no longer describes the change. Please retitle it, for example "XMA: the frame walk stops at the padding marker".

CI: passing.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:36 UTC · [original](https://github.com/Marvisak/VIctory/pull/1797#issuecomment-7149744126) · edited 2026-11-25 20:23 UTC <!-- victory-triage v1 head=673efe616bb77dbacf841f1bf78bbf72b75c428d verdict=merge-candidate at=2026-11-25T20:22:45Z --> Automated triage for the maintainers. **Merge candidate.** The new commit `673efe6` follows the previous review's suggestion. It drops the rejection of frame starts inside a packet header from `read_frame` (`crates/victory-formats/src/xma.rs`), along with its test, so a start at a packet boundary is again stepped over by `Cursor` as on `main`. What remains is the padding-marker fix: `next_frame`'s walk from the packet's first frame now stops at a `0x7fff` length, the same rule `read_frame` already applies. On `main` the walk would add 32767 bits, overshoot `start`, and count a frame that isn't there. Tests: - `padding_marker_before_start_ends_the_search` gives `next == None` here. On `main`, reading the same data jumps to the next packet, so the test tells the two versions apart. - `truncated_frame_and_out_of_range_starts_are_rejected` pins behaviour `Cursor` already has. This only matters for streams where a padding marker comes before a frame start in the same packet, which is damaged data. One thing before merging: the PR title still says "reject frame starts in packet headers", which no longer describes the change. Please retitle it, for example "XMA: the frame walk stops at the padding marker". CI: passing. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠catminou4 on GitHub · 2026-11-24 23:05 UTC · original · approved these changes

Tested locally on macOS arm64 (rustc 1.98.1): PR head merged cleanly into current main (70564ae).

cargo test -p victory-formats --locked → 24 passed, 0 failed. frame_starts_must_be_inside_packet_payloads: XMA frame-start validation tightened to packet payloads — small, correct-looking.

**@⁠catminou4** on GitHub · 2026-11-24 23:05 UTC · [original](https://github.com/Marvisak/VIctory/pull/1797#pullrequestreview-6048825796) · **approved these changes** Tested locally on macOS arm64 (rustc 1.98.1): PR head merged cleanly into current main (70564ae). cargo test -p victory-formats --locked → 24 passed, 0 failed. frame_starts_must_be_inside_packet_payloads: XMA frame-start validation tightened to packet payloads — small, correct-looking.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 19:24 UTC · original · approved these changes

Verified locally merged onto origin/main (63bcca43, Windows 11 x64, Rust 1.98.1 MSVC):

  • cargo test --locked -p victory-formats xma — 22 passed, 0 failed, 3 ignored (including padding_marker_before_start_ends_the_search and truncated_frame_and_out_of_range_starts_are_rejected)
  • cargo clippy --locked -p victory-formats --all-targets -- -D warnings (default and --all-features) — 0 warnings
  • cargo xtask policy — ok (191 files ok)

Review notes

  • The production diff at 673efe6 cleanly stops next_frame on the 0x7fff frame-length padding marker (crates/victory-formats/src/xma.rs:165) without rejecting valid payload-relative FrameOffsetInBits offsets (0..=31) or 0x7fff no-start packet headers.
  • Minor non-blocking note: the PR title still mentions rejecting frame starts in packet headers from before commit 673efe6 removed that check.
**@⁠fuzeofficlal** on GitHub · 2026-11-26 19:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/1797#pullrequestreview-6079495589) · **approved these changes** Verified locally merged onto `origin/main` (`63bcca43`, Windows 11 x64, Rust 1.98.1 MSVC): - `cargo test --locked -p victory-formats xma` — **22 passed, 0 failed, 3 ignored** (including `padding_marker_before_start_ends_the_search` and `truncated_frame_and_out_of_range_starts_are_rejected`) - `cargo clippy --locked -p victory-formats --all-targets -- -D warnings` (default and `--all-features`) — 0 warnings - `cargo xtask policy` — ok (`191 files ok`) ### Review notes - The production diff at `673efe6` cleanly stops `next_frame` on the `0x7fff` frame-length padding marker (`crates/victory-formats/src/xma.rs:165`) without rejecting valid payload-relative `FrameOffsetInBits` offsets (`0..=31`) or `0x7fff` no-start packet headers. - Minor non-blocking note: the PR title still mentions rejecting frame starts in packet headers from before commit `673efe6` removed that check.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1797/head:github-bot/gh-1797'
git switch 'github-bot/gh-1797'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1797'
git switch 'github-bot/gh-1797'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1797'
git switch 'github-bot/gh-1797'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1797'
git switch 'main'
git merge --squash 'github-bot/gh-1797'
git switch 'main'
git merge --ff-only 'github-bot/gh-1797'
git switch 'main'
git merge 'github-bot/gh-1797'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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!1797
No description provided.