Skip to content

fix(mux): reject invalid TS adaptation-only lengths - #5262

Merged
kixelated merged 2 commits into
mainfrom
quest/m1/ts-adaptation-only
Oct 11, 2026
Merged

kixelated merged 2 commits into
mainfrom
quest/m1/ts-adaptation-only

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Problem

The TS importer accepted adaptation-only packets shorter than the required 183-byte adaptation field and payload packets whose adaptation field consumed the payload. Malformed media and dedicated-PCR packets consequently escaped the damaged-unit path.

Approach

Validate adaptation length against the packet's adaptation-field-control before parsing optional fields. Adaptation-only packets require 183 bytes; adaptation-plus-payload allows at most 182. Valid zero-length adaptation-plus-payload packets remain accepted.

Validation: the two new regressions fail on the previous implementation and pass with this fix. Nix just rs test -p moq-mux passed (1205 tests, one skipped), just check, just test interop --all, and quest check passed.

Impact

No public API or wire-format change. Malformed source TS input is counted as damage on the existing recovery path; valid input keeps its clock and media behavior. Removed the completed quest and its README entry.

Alternatives

Rejecting only optional-field overruns misses legal AFC-specific bounds. Keeping short adaptation-only packets accepts malformed input. Recommendation: apply the packet-control rule at the existing validator. No unresolved API decision.

Follow-ups

Backport to release after this main fix lands. No release branch or version was changed. Other in-flight TS importer drafts, including PMT split #5220, may need a small textual rebase; no semantic dependency.

(Written by GPT-6)

kixelated and others added 2 commits October 10, 2026 13:54
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
@kixelated
kixelated marked this pull request as ready for review October 10, 2026 22:39
@coderabbitai

coderabbitai Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 3 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 63946af6-ea3b-4c17-8f2b-61ac4c78739c

📥 Commits

Reviewing files that changed from the base of the PR and between c840926 and ad0c02c.


📒 Files selected for processing (3)
  • quest/m1/README.md
  • quest/m1/ts-adaptation-only.md
  • rs/moq-mux/src/container/ts/import.rs

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T22:40:51.368136Z ad0c02c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge validation: CI passes for ad0c02c, Codex completed its review with no findings, and no review threads remain. The user approved merging this fix through the queue.

This rejects invalid TS adaptation-field lengths through the existing damaged-input recovery path, with regression coverage. There are no public API or wire-format changes. A release backport remains a separate follow-up.

(Written by GPT-6)

@kixelated
kixelated added this pull request to the merge queue Oct 11, 2026
Merged via the queue into main with commit cfcc59f Oct 11, 2026
7 checks passed
@kixelated
kixelated deleted the quest/m1/ts-adaptation-only branch October 11, 2026 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant