Skip to content

Auto-port 5.0: Fix missing readable-bytes checks in QuicHeaderParser - #17561

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

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

Conversation

@netty-project-bot

Copy link
Copy Markdown
Contributor

Auto-port of #17515 to 5.0
Cherry-picked commit: fdd2b67


Motivation:

QuicHeaderParser read the destination/source connection-id length
bytes of a long-header QUIC packet without first verifying enough
bytes were readable, unlike every other read in the class. A
truncated datagram could trigger a raw IndexOutOfBoundsException
instead of the expected QuicException, or silently read stale bytes
from an over-allocated buffer.

Modifications:

Add the missing checkReadable() guards and a regression test.

Result:

No more risk of IOOBE

Motivation:

QuicHeaderParser read the destination/source connection-id length
bytes of a long-header QUIC packet without first verifying enough
bytes were readable, unlike every other read in the class. A
truncated datagram could trigger a raw IndexOutOfBoundsException
instead of the expected QuicException, or silently read stale bytes
from an over-allocated buffer.

Modifications:

Add the missing checkReadable() guards and a regression test.

Result:

No more risk of IOOBE

(cherry picked from commit fdd2b67)
@testlens-app

testlens-app Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

🚨 TestLens detected 1 failed test 🚨

Here is what you can do:

  1. Inspect the test failures carefully.
  2. If you are convinced that some of the tests are flaky, you can mute them below.
  3. Finally, trigger a rerun by checking the rerun checkbox.

Test Summary

Build PR / macos-aarch64-java25-boringssl build > Netty/Transport/Native/KQueue

Test Runs Flakiness
KQueueDatagramUnicastIPv6MappedTest > testSimpleSendWithConnect(TestInfo) ❌ 4% 🟡

🏷️ Commit: 8a43dc5
▶️ Tests: 232127 executed
⚪️ Checks: 12/12 completed

Test Failures

KQueueDatagramUnicastIPv6MappedTest > testSimpleSendWithConnect(TestInfo) (Netty/Transport/Native/KQueue in Build PR / macos-aarch64-java25-boringssl build)
org.opentest4j.AssertionFailedError
	at io.netty.testsuite.transport.socket.DatagramUnicastTest.testSimpleSendWithConnect0(DatagramUnicastTest.java:429)
	at io.netty.testsuite.transport.socket.DatagramUnicastTest.testSimpleSendWithConnect(DatagramUnicastTest.java:382)
	at io.netty.testsuite.transport.socket.DatagramUnicastTest.testSimpleSendWithConnect(DatagramUnicastTest.java:212)
	at io.netty.testsuite.transport.socket.DatagramUnicastTest$7.run(DatagramUnicastTest.java:206)
	at io.netty.testsuite.transport.socket.DatagramUnicastTest$7.run(DatagramUnicastTest.java:203)
	at io.netty.testsuite.transport.AbstractComboTestsuiteTest.run(AbstractComboTestsuiteTest.java:52)
	at io.netty.testsuite.transport.socket.DatagramUnicastTest.testSimpleSendWithConnect(DatagramUnicastTest.java:203)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)

Rerun Controls

Select tests to mute in this pull request:

  • KQueueDatagramUnicastIPv6MappedTest > testSimpleSendWithConnect(TestInfo)

Reuse successful test results:

  • ♻️ Only rerun the tests that failed or were muted before

Click the checkbox to trigger a rerun:

  • Rerun jobs

Learn more about TestLens at testlens.app/docs.

@normanmaurer
normanmaurer merged commit f9c2f83 into 5.0 Sep 21, 2026
12 of 13 checks passed
@normanmaurer
normanmaurer deleted the auto-port-pr-17515-to-5.0 branch September 21, 2026 09:13
@normanmaurer normanmaurer added this to the 5.0.0.Final milestone Sep 21, 2026
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