Skip to content

Auto-port 5.0: Add regression tests for CANCEL_PUSH/GOAWAY/MAX_PUSH_ID trailing bytes - #17585

Merged
normanmaurer merged 1 commit into
5.0from
auto-port-pr-17571-to-5.0
Sep 22, 2026
Merged

normanmaurer merged 1 commit into
5.0from
auto-port-pr-17571-to-5.0

Conversation

@netty-project-bot

Copy link
Copy Markdown
Contributor

Auto-port of #17571 to 5.0
Cherry-picked commit: 68466e3


Motivation:

Http3FrameCodec.enforceExactIdLength() (added in #17523) rejects
CANCEL_PUSH, GO_AWAY and MAX_PUSH_ID frames whose declared payload
length does not exactly match the encoded width of their single
push-id/stream-id varint. That fix already covers a declared length
shorter than the varint's width, but there was no test asserting the
opposite direction: a declared length longer than the varint's width,
which would otherwise leave unread trailing bytes in the buffer to be
mis-parsed as the type/length/payload of a bogus subsequent frame,
desynchronizing the control stream.

Modifications:

Add parameterized tests for all three frame types that send a
payload declared as the maximum 8 bytes but containing only a 1-byte
varint followed by 7 trailing bytes shaped like a HEADERS frame
header. Assert the connection is closed with H3_FRAME_ERROR and that
no frame, legitimate or smuggled, is produced from the trailing
bytes.

Result:

Explicit regression coverage for the control-stream desynchronization
scenario. This is a followup to #17523

#17571)

Motivation:

Http3FrameCodec.enforceExactIdLength() (added in #17523) rejects
CANCEL_PUSH, GO_AWAY and MAX_PUSH_ID frames whose declared payload
length does not exactly match the encoded width of their single
push-id/stream-id varint. That fix already covers a declared length
shorter than the varint's width, but there was no test asserting the
opposite direction: a declared length longer than the varint's width,
which would otherwise leave unread trailing bytes in the buffer to be
mis-parsed as the type/length/payload of a bogus subsequent frame,
desynchronizing the control stream.

Modifications:

Add parameterized tests for all three frame types that send a
payload declared as the maximum 8 bytes but containing only a 1-byte
varint followed by 7 trailing bytes shaped like a HEADERS frame
header. Assert the connection is closed with H3_FRAME_ERROR and that
no frame, legitimate or smuggled, is produced from the trailing
bytes.

Result:

Explicit regression coverage for the control-stream desynchronization
scenario. This is a followup to
#17523

(cherry picked from commit 68466e3)
@testlens-app

testlens-app Bot commented Sep 22, 2026

Copy link
Copy Markdown

✅ All tests passed ✅

🏷️ Commit: dd27d0e
▶️ Tests: 229862 executed
⚪️ Checks: 12/12 completed


Learn more about TestLens at testlens.app/docs.

@normanmaurer
normanmaurer merged commit 17c0d64 into 5.0 Sep 22, 2026
13 checks passed
@normanmaurer normanmaurer added this to the 5.0.0.Final milestone Sep 22, 2026
@normanmaurer
normanmaurer deleted the auto-port-pr-17571-to-5.0 branch September 22, 2026 07:58
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.

2 participants