GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Auto-port 5.0: Reject negative session timeout and cache size in the QUIC SSLSessionContext by netty-project-bot · Pull Request #18415 · netty/netty

Conversation

@netty-project-bot

@netty-project-bot netty-project-bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Auto-port of #18414 to 5.0
Cherry-picked commit: 887f597


Motivation:

SSLSessionContext.setSessionTimeout(int) and setSessionCacheSize(int) are specified to throw IllegalArgumentException for a negative value, and OpenSslSessionContext does so with checkPositiveOrZero. The QUIC session context (QuicheQuicSslContext$QuicheQuicSslSessionContext) stores the value instead:

SslContext context = QuicSslContextBuilder.forClient().sessionCacheSize(20).sessionTimeout(50).build();
SSLSessionContext sessionContext = context.sessionContext();
sessionContext.setSessionTimeout(-1);     // accepted
sessionContext.getSessionTimeout();       // -1
sessionContext.setSessionCacheSize(-1);   // accepted
sessionContext.getSessionCacheSize();     // -1

A server context passes the value to BoringSSL's SSL_CTX_set_timeout, whose timeout is an unsigned 32-bit value, so a timeout of -1 becomes about 136 years.

Modification:

Check both values with ObjectUtil.checkPositiveOrZero in QuicheQuicSslContext.setSessionTimeout and setSessionCacheSize, before the branch between the Java client session cache and BoringSSL's internal cache, and extend QuicSslContextTest.testSessionContextSettings, which runs for both a client and a server context.

Result:

Negative values are rejected with IllegalArgumentException, as the SSLSessionContext contract and OpenSslSessionContext require, and the previous settings are kept.

Testing: I ran the client case above against codec-classes-quic built from this branch and from current 4.2, with a locally built native QUIC library: before the change both calls are accepted and stored as -1; after it both throw and the values stay 50 and 20. That native library predates a recent JNI addition (SSLContext_setSessionIdContext), so I could not build a server context with it; the server case of the extended test is left to CI. Checkstyle passes.

This issue was found by an LLM-Enhanced Static Analysis Engine and verified manually.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Marti2203 @netty-project-bot
Reject negative session timeout and cache size in the QUIC SSLSession…
e724c60
…Context (#18414)

(cherry picked from commit 887f597)
@netty-project-bot netty-project-bot mentioned this pull request Nov 14, 2026
Reject negative session timeout and cache size in the QUIC SSLSessionContext #18414
Merged
@testlens-app

testlens-app Bot commented Nov 14, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

🚨 All tests passed but jobs failed 🚨

Failed Jobs without Test Failures

❌ Build PR / macos-x86_64-java25-boringssl build

🏷️ Commit: e724c60
▶️ Tests: 39356 executed
⚪️ Checks: 20/20 completed

Rerun Controls

Click the checkbox to trigger a rerun:

  • Rerun jobs

Learn more about TestLens at testlens.app/docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@normanmaurer
normanmaurer merged commit 597aa3a into 5.0 Nov 14, 2026
20 of 21 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@normanmaurer
normanmaurer deleted the auto-port-pr-18414-to-5.0 branch November 14, 2026 16:10
@normanmaurer normanmaurer added this to the 5.0.0.Final milestone Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

5.0.0.Final

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@netty-project-bot @normanmaurer @Marti2203
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.