Repository navigation
fix(mux): reject invalid TS adaptation-only lengths - #5262
Conversation
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
|
Warning Review limit reachedYou'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. View limit details
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. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
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) |
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)