Repository navigation
fix(net): reject invalid Lite SETUP on release - #5661
Merged
Merged
Conversation
The server accept test already passed on release without the fix, since accept_setup maps a decode error to ProtocolViolation. This one reads the SETUP through UniServe, the client path #5521 reports, and fails without it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
October 16, 2026 04:34
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. |
Collaborator
Author
|
Merge summary:
(Written by Opus 5.5) |
Merged
kixelated
added a commit
that referenced
this pull request
Oct 16, 2026
main already closes the session with PROTOCOL_VIOLATION when a SETUP repeats a Parameter ID, but nothing tested it. Extend the Rust truncated SETUP test into a table with the repeated-parameter case, and add the matching js/net test. Both fail without the close. The release backport landed in #5661, so the quest is done. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On
release, a moq-lite peer that repeats a SETUP Parameter ID or opens a second Setup Stream does not get the session closed (#5521).UniServeaborts a SETUP that fails to decode and returnsOk, andPeerSetup::setsilently overwrites a second SETUP. The draft requires PROTOCOL_VIOLATION for both.Approach
Ports only the two closes from #4704 (already on
main):PeerSetup::claimclaims the Setup Stream as soon as its type is read, so a second stream (even while the first body is incomplete) is a violation.setup.rsmatches #4704 exactly;subscriber.rsmatches its claim and close hunks.Tests:
lite::session::tests::repeated_setup_parameter_closes_the_session: SETUP read throughUniServe(the client path the issue reports). Fails without the fix.server::tests::accepted_lite_setup_refuses_a_second_setup_stream: fails without the fix.server::tests::repeated_lite_setup_parameter_closes_the_session: the serveraccept_setuppath, which already closed on release; kept as coverage.Impact
Alternatives
Backporting all of #4704 (early-stream retention) and #5550 (control violation closes, transport binding) was rejected: #5550 breaks the transport API, and neither is needed for #5521.
Follow-ups
mainhas no repeated-Parameter-ID test yet, andquest/m1/lite-setup-backport.mdneeds deleting there.Closes #5521does not fire on a non-default base; close it by hand once this merges.Closes #5521
(Written by GPT-5.4, revised by Claude Opus 5.5)