Skip to content

SSL: Use sane defaults as limits for the client hello length and timeout#16871

Merged
normanmaurer merged 1 commit into
4.1from
sni_41
Jun 2, 2026
Merged

SSL: Use sane defaults as limits for the client hello length and timeout#16871
normanmaurer merged 1 commit into
4.1from
sni_41

Conversation

@normanmaurer
Copy link
Copy Markdown
Member

Motivation:

There were various issues here... first of in SslClientHelloHandler we used 16MB as default maximum limit for the client hello which could lead to huge memory usage. Second we used no limit at all and no timeout in AbstractSniHandler and its subclasses which is even worse.

Modifications:

  • Use 64KB as default limit
  • Use 10 seconds as default timeout (same as in SslHandler)

Result:

Saner defaults which helps to guard against high memory usage

Motivation:

There were various issues here... first of in SslClientHelloHandler we used 16MB as default maximum limit for the client hello which could lead to huge memory usage. Second we used no limit at all and no timeout in AbstractSniHandler and its subclasses which is even worse.

Modifications:

- Use 64KB as default limit
- Use 10 seconds as default timeout (same as in SslHandler)

Result:

Saner defaults which helps to guard against high memory usage
@normanmaurer normanmaurer added the needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. label Jun 1, 2026
@normanmaurer normanmaurer added this to the 4.1.135.Final milestone Jun 1, 2026
@normanmaurer normanmaurer merged commit 829c885 into 4.1 Jun 2, 2026
20 of 21 checks passed
@normanmaurer normanmaurer deleted the sni_41 branch June 2, 2026 10:09
@netty-project-bot
Copy link
Copy Markdown
Contributor

Auto-port PR for 5.0: #16897

@github-actions github-actions Bot removed the needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. label Jun 2, 2026
chrisvest pushed a commit that referenced this pull request Jun 4, 2026
…length and timeout (#16897)

Auto-port of #16871 to 5.0
Cherry-picked commit: 829c885

---
Motivation:

There were various issues here... first of in SslClientHelloHandler we
used 16MB as default maximum limit for the client hello which could lead
to huge memory usage. Second we used no limit at all and no timeout in
AbstractSniHandler and its subclasses which is even worse.

Modifications:

- Use 64KB as default limit
- Use 10 seconds as default timeout (same as in SslHandler)

Result:

Saner defaults which helps to guard against high memory usage

Co-authored-by: Norman Maurer <[email protected]>
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