You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
moq-lite-06: a client accepts Path or Role in the server's SETUP instead of closing with PROTOCOL_VIOLATION #5257
A client built from moq-net accepts a server SETUP that carries the client-only Path or Role parameter and keeps the session open. moq-lite-06 requires the client to close the session with PROTOCOL_VIOLATION in both cases.
Path: "MUST NOT be sent on a binding whose handshake carries a request URI (bindings 2 and 4), and only the client sends it; a receiver MUST close the session with a PROTOCOL_VIOLATION on either violation".
Role: "Only the client sends it; a client that receives one MUST close the session with a PROTOCOL_VIOLATION."
Repro
Dial a server over moql:// (native QUIC, ALPN moq-lite-06) with moq --connect-version moq-lite-06 --connect-once --connect URL --broadcast x import fmp4 and have the server send its SETUP Setup Stream (uni stream type 0x1) as:
The CLI logs received peer setup setup=Setup { probe: None, path: Some("/"), role: None, ... } (and the same with path: None for the Role case) and the session stays open; no close arrives within 3 s. Same on WebTransport for Role.
Verified on moq 0.14.2 built from main at 954505e and on 0.14.1 at b8b0d23.
Where
rs/moq-net/src/lite/setup.rsdecode_msg reads Path for any role and maps Role through Role::from_code, which turns 0 and unknown values into None, so the parameter's presence is lost before the setup is stored.
rs/moq-net/src/lite/subscriber.rs stores the peer's SETUP (peer_setup) without checking who sent it.
Suggested fix
When the endpoint is the client and the received SETUP carries Path (any value, an empty one included) or Role (any value), close with PROTOCOL_VIOLATION. Keep "unknown Role value means Both" for the server side, but record that the parameter was present.
Found with an interop runner (mondain/moq-contribution-interop-runner, docs/moq-lite-punch-list.md items ML-01 and ML-02; rows L06-7-3-2-MUST-126 and L06-7-3-3-MUST-131). Drafted with AI assistance; the wire bytes and logs above are from real runs.
SETUP: a client closes with PROTOCOL_VIOLATION on Path or Role in the server's SETUP. A server also closes on Path over a binding whose handshake carries a URI.
PROBE: a Report-level publisher decodes PROBE targets and keeps reporting. Only a FIN or a reset ends the stream.
Control streams: any decode error on a control stream closes the session with PROTOCOL_VIOLATION, not just the two cases cited. This includes child handlers and response decoders on streams we opened. Data-stream decode errors stay per-stream.
The rules are the same from lite-06 through lite-07-wip, so the fix covers every lite version. Thanks for the precise byte-level repros.
Anyone who wants to donate tokens can run /quest-start quest/m1/lite-malformed-close.
Activity
kixelated commentedon Oct 12, 2026
Confirmed in Rust, and in js/net too where it applies. We're fixing #5257, #5258 and #5259 together in one quest,
quest/m1/lite-malformed-close.md, planned in #5358. Decisions:The rules are the same from lite-06 through lite-07-wip, so the fix covers every lite version. Thanks for the precise byte-level repros.
Anyone who wants to donate tokens can run
/quest-start quest/m1/lite-malformed-close.(Written by Claude Opus 5.5)
quest(m1): import moq-dev#5257-moq-dev#5259, moq-dev#5347, moq-dev#5348…