Skip to content

Auto-port 4.1: Fix HTTP 2 PUSH_PROMISE stream association validation#16955

Merged
normanmaurer merged 1 commit into
4.1from
auto-port-pr-16952-to-4.1
Jun 16, 2026
Merged

Auto-port 4.1: Fix HTTP 2 PUSH_PROMISE stream association validation#16955
normanmaurer merged 1 commit into
4.1from
auto-port-pr-16952-to-4.1

Conversation

@netty-project-bot

Copy link
Copy Markdown
Contributor

Auto-port of #16952 to 4.1
Cherry-picked commit: 6dabf56


Motivation:

DefaultHttp2FrameReader did not verify that PUSH_PROMISE frames are associated
with a stream before processing the frame-specific payload. As a result, a
PUSH_PROMISE frame with stream ID 0 was not rejected by the same stream
association validation used by DATA, HEADERS, PRIORITY, and RST_STREAM frames.

Per RFC 9113 section 6.6, PUSH_PROMISE frames identify the stream they are
associated with, and receipt of a PUSH_PROMISE frame with stream ID 0 MUST be
treated as a connection error of type PROTOCOL_ERROR.

Modifications:

  • Add verifyAssociatedWithAStream() to verifyPushPromiseFrame().
  • Add a regression test for PUSH_PROMISE with stream ID 0.
  • Verify that the error is connection-level PROTOCOL_ERROR.
  • Verify that onPushPromiseRead(...) is not invoked for the invalid frame.

Result:

Invalid PUSH_PROMISE frames with stream ID 0 are now rejected consistently
with other stream-associated HTTP/2 frame types.

Motivation:

`DefaultHttp2FrameReader` did not verify that `PUSH_PROMISE` frames are
associated
with a stream before processing the frame-specific payload. As a result,
a
`PUSH_PROMISE` frame with stream ID `0` was not rejected by the same
stream
association validation used by DATA, HEADERS, PRIORITY, and RST_STREAM
frames.

Per RFC 9113 section 6.6, `PUSH_PROMISE` frames identify the stream they
are
associated with, and receipt of a `PUSH_PROMISE` frame with stream ID
`0` MUST be
treated as a connection error of type `PROTOCOL_ERROR`.

Modifications:

- Add `verifyAssociatedWithAStream()` to `verifyPushPromiseFrame()`.
- Add a regression test for `PUSH_PROMISE` with stream ID `0`.
- Verify that the error is connection-level `PROTOCOL_ERROR`.
- Verify that `onPushPromiseRead(...)` is not invoked for the invalid
frame.

Result:

Invalid `PUSH_PROMISE` frames with stream ID `0` are now rejected
consistently
with other stream-associated HTTP/2 frame types.

(cherry picked from commit 6dabf56)
@normanmaurer normanmaurer added this to the 4.1.136.Final milestone Jun 16, 2026
@normanmaurer normanmaurer merged commit 13ff5ca into 4.1 Jun 16, 2026
17 of 18 checks passed
@normanmaurer normanmaurer deleted the auto-port-pr-16952-to-4.1 branch June 16, 2026 10:09
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