Skip to content

Auto-port 5.0: QpackEncoder.sectionAcknowledgment must not NPE when dynamic table is disabled - #17555

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

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

Conversation

@netty-project-bot

Copy link
Copy Markdown
Contributor

Auto-port of #17537 to 5.0
Cherry-picked commit: 8ce5930


Motivation:

QpackEncoder.sectionAcknowledgment(...) only had an assert to guard
against streamSectionTrackers being null, which is a no-op unless the
JVM runs with -ea. When a peer negotiates
SETTINGS_QPACK_MAX_TABLE_CAPACITY=0 (the RFC 9204 default),
configureDynamicTable(...) never allocates streamSectionTrackers. A
peer can then send a single Section Acknowledgment instruction
(0x80) on its QPACK decoder stream and trigger a
NullPointerException, which escapes the QpackException catch in
QpackDecoderHandler and tears down the connection.

Modification:

Replace the assert with an explicit null check that throws the
existing INVALID_SECTION_ACKNOWLEDGMENT QpackException, matching the
pattern already used by the sibling streamCancellation(...) method.

Result:

A Section Acknowledgment received while the dynamic table is disabled
is now reported as a QpackException instead of crashing the
connection with an unchecked NullPointerException.

… disabled (#17537)

Motivation:

QpackEncoder.sectionAcknowledgment(...) only had an assert to guard
against streamSectionTrackers being null, which is a no-op unless the
JVM runs with -ea. When a peer negotiates
SETTINGS_QPACK_MAX_TABLE_CAPACITY=0 (the RFC 9204 default),
configureDynamicTable(...) never allocates streamSectionTrackers. A
peer can then send a single Section Acknowledgment instruction
(0x80) on its QPACK decoder stream and trigger a
NullPointerException, which escapes the QpackException catch in
QpackDecoderHandler and tears down the connection.

Modification:

Replace the assert with an explicit null check that throws the
existing INVALID_SECTION_ACKNOWLEDGMENT QpackException, matching the
pattern already used by the sibling streamCancellation(...) method.

Result:

A Section Acknowledgment received while the dynamic table is disabled
is now reported as a QpackException instead of crashing the
connection with an unchecked NullPointerException.

(cherry picked from commit 8ce5930)
@testlens-app

testlens-app Bot commented Sep 20, 2026

Copy link
Copy Markdown

✅ All tests passed ✅

🏷️ Commit: db38a07
▶️ Tests: 232066 executed
⚪️ Checks: 12/12 completed


Learn more about TestLens at testlens.app/docs.

@normanmaurer normanmaurer added this to the 5.0.0.Final milestone Sep 20, 2026
@normanmaurer
normanmaurer merged commit f07eb2a into 5.0 Sep 20, 2026
13 checks passed
@normanmaurer
normanmaurer deleted the auto-port-pr-17537-to-5.0 branch September 20, 2026 16:55
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