Skip to content

h3: harden request stream frame processing in clients#2477

Merged
LPardue merged 1 commit into
masterfrom
harden-h3-client-frame-validation
May 14, 2026
Merged

h3: harden request stream frame processing in clients#2477
LPardue merged 1 commit into
masterfrom
harden-h3-client-frame-validation

Conversation

@LPardue
Copy link
Copy Markdown
Contributor

@LPardue LPardue commented May 13, 2026

Previously, the request-stream frame-type validation in
set_frame_type was gated on !self.is_local, which meant that
on a client (where request streams are locally initiated) the entire
match block was skipped. As a result, a server could send CANCEL_PUSH,
SETTINGS, GOAWAY, MAX_PUSH_ID or PRIORITY_UPDATE frames on a request
stream and the client would silently accept them, in some cases
mutating connection state (peer_settings, peer_goaway_id) or surfacing
spurious events to the application.

RFC 9114 requires these frames to be rejected with H3_FRAME_UNEXPECTED
regardless of which endpoint opened the stream.

This change is focused on hardening illegal-frame-type check gaps that
existed for the client; new tests have been added to exercise them. Other
types of exchanges already have coverage, or are due for a significant
refactor in planned work.

Previously, the request-stream frame-type validation in
`set_frame_type` was gated on `!self.is_local`, which meant that
on a client (where request streams are locally initiated) the entire
match block was skipped. As a result, a server could send CANCEL_PUSH,
SETTINGS, GOAWAY, MAX_PUSH_ID or PRIORITY_UPDATE frames on a request
stream and the client would silently accept them, in some cases
mutating connection state (peer_settings, peer_goaway_id) or surfacing
spurious events to the application.

RFC 9114 requires these frames to be rejected with H3_FRAME_UNEXPECTED
regardless of which endpoint opened the stream.

This change is focused on hardening illegal-frame-type check gaps that
existed for the client; new tests have been added to exercise them. Other
types of exchanges already have coverage, or are due for a significant
refactor in planned work.
@LPardue LPardue requested a review from a team as a code owner May 13, 2026 17:54
@LPardue
Copy link
Copy Markdown
Contributor Author

LPardue commented May 13, 2026

Note that the H3 stream state prcessing logic also has other pending improvements such as #2153. I want to keep this one as focused as possible.

@LPardue LPardue merged commit 2cccba0 into master May 14, 2026
38 checks passed
@LPardue LPardue deleted the harden-h3-client-frame-validation branch May 14, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants