Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TCP TLS server SNI server name leak #5100

Merged
merged 3 commits into from Feb 6, 2024
Merged

Fix TCP TLS server SNI server name leak #5100

merged 3 commits into from Feb 6, 2024

Conversation

vietj
Copy link
Member

@vietj vietj commented Feb 6, 2024

The SslChannelProvider class maintains a map of server name to Netty SslContext that is filled when a client provides a server name. When a server name does not resolve to a KeyManagerFactory or TrustManagerFactory, the default factories are used and the entry is stored in the map. Instead no specific factory is resolved the default Netty SslContext is used, since this can lead to a a memory leak when a client specifies spurious SNI server names. This affects only a TCP server when SNI is set in the HttpServerOptions.

In addition fix: the TCP client will not send the correct server name to the client due to SSL client resumption performed by the SSL implementation although we are using a new engine implementation.

Fixes CVE-2024-1300

…e to SSL client resumption performed by the SSL implementation although we are using a new engine implementation.

The SSL channel provider when a server name is specified for a client should use the SSL context map to avoid this.
…SslContext that is filled when a client provides a server name. When a server name does not resolve to a KeyManagerFactory or TrustManagerFactory, the default factories are used and the entry is stored in the map. Instead no specific factory is resolved the default Netty SslContext is used, since this can lead to a a memory leak when a client specifies spurious SNI server names. This affects only a TCP server when SNI is set in the HttpServerOptions.
@vietj vietj added this to the 4.5.3 milestone Feb 6, 2024
@vietj vietj added the bug label Feb 6, 2024
@vietj vietj merged commit 7ad34ea into 4.x Feb 6, 2024
7 checks passed
@vietj vietj deleted the ssl-context-fixes-4.x branch February 6, 2024 14:16
@vietj vietj self-assigned this Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant