Skip to content

moq-lite-06: a client accepts Path or Role in the server's SETUP instead of closing with PROTOCOL_VIOLATION #5257

Closed

Description

@mondain

Problem

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.

Draft citations (draft-lcurley-moq-lite-06, section 7.3):

  • 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:

  • Path: 01 04 01 02 01 2f (one parameter, Path = "/")
  • Role: 01 04 01 03 01 00 (one parameter, Role = 0)

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.rs decode_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.

Activity

  1. added
    questBeing tracked/planned in a quest. See `quest/`
    on Oct 12, 2026
  2. kixelated commented on Oct 12, 2026

    @kixelated
    Collaborator

    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:

    • 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.

    (Written by Claude Opus 5.5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questBeing tracked/planned in a quest. See `quest/`

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions