Skip to content

qmux: encode and validate STREAM offsets per draft-02 #294

Description

@kixelated

Summary

Both QMux implementations omit the STREAM Offset field when encoding and discard it when decoding.

Impact

Under QUIC v1 framing, omitting OFF means offset zero. A second STREAM frame for the same stream is therefore encoded as offset zero rather than immediately following the first. A conforming QMux peer can reject ordinary multi-frame streams, while these implementations silently concatenate malicious gaps or overlaps.

QMux draft-02 keeps the QUIC v1 Offset field and requires PROTOCOL_VIOLATION when a payload does not immediately follow the prior payload: https://datatracker.ietf.org/doc/html/draft-ietf-quic-qmux-02#section-4.1

Suggested fix

Track send offsets and emit OFF, track expected receive offsets, and reject gaps, overlaps, or post-final data. Add cross-implementation tests for sequential writes, gaps, overlaps, and FIN followed by data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions