Repository navigation
fix(net): refuse malformed complete announce bodies - #6909
Conversation
Quest-Claim: f428bc20d9103f59
Co-Authored-By: GPT-6 <noreply@openai.com>
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. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 4a58bf3
No actionable bugs found in the changed code and relevant surrounding paths. Applying DecodeError::complete only after sub(size) succeeds is the right boundary: malformed complete legacy and typed ANNOUNCE bodies become protocol violations, while genuinely incomplete outer frames still wait. Unknown-type skipping and trailing-byte rejection remain intact.
The small local closure follows the existing TRACKS decoder pattern; a broader framing refactor is not needed for this fix. The open-stream failure test, split-valid-frame control, corpus cases, and six additional fuzz dispatch arms provide focused regression coverage.
Verification: source inspection of decoding, reader retry/error propagation, subscriber state machine, test transport, and fuzz harness/seeds. I did not run builds, tests, or fuzzing; the PR's reported validation was not independently reproduced.
|
No actionable comments were generated in the recent review.
|
|
Merge summary for head
(Written by Claude Opus 5.5) |
Problem
A complete size-prefixed ANNOUNCE body could return
Shortfor a missing inner field. The stream reader then waited for bytes outside that body, leaving announce discovery stalled while the peer kept its stream open.Approach
Apply the existing
DecodeError::completerule after both legacy and lite-06/07 bodies are fully buffered. The production announce subscriber now closes the session withPROTOCOL_VIOLATION; an incomplete outer frame still waits and resumes normally. Other lite/IETF bounded-body decoders already apply the rule.Strengthen the private fuzz roundtrip invariant so
Shortmust require more outer input. Register TRACKS, TRACKS_EVENT, AUTH, AUTH_OK, AUTH_ERROR, and AUTH_REPLY, with valid seeds and three ANNOUNCE counterexamples replayed in the normal suite.Impact
Validation
Pendingfor a complete malformed lite-05 body on an open peer stream. Its genuinely incomplete outer-frame control passed.PROTOCOL_VIOLATIONclose without waiting for FIN or more bytes. A split valid frame stays open and announces its route after the last byte arrives.nix develop --command just ci origin/mainpasses on4a58bf37ab41dadd31a547dab95259369e72b259against basef23b4107ba0a1e679cfa9b708239ed7b0e3ce86d: 1,224 seconds, 9,114 Rust tests passed (97 skipped), strict feature/transport checks, and repository tooling. Trusted quest check passes for 617 documents.-D recursion_depth_exceeding_limit. The build stops before any fuzz executions at unchangedrs/moq-net/src/ietf/publisher/tracks.rs:826(theSend/MaybeBoxedExtfuture chain). No recursion limit was raised or lint weakened.just fixwas run and stops at the unchangedrs/moq-mux/benches/catalog.rs:226reference to missinghang::catalog::MAX_RENDITIONS. Changed Rust files were formatted independently.Alternatives
Waiting for a later byte or FIN does not repair an already complete body. Applying completion only after the declared body arrives preserves legitimate streaming reads and uses the same boundary as other control messages.
Follow-ups
quest/m0/nightly/send-overflow.md. The exact nightly build limitation is also recorded on moq-dev/moq#6648. The stable target replay and required full gate above are distinct passing evidence.(Written by GPT-6)