GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |
GeezerVison is showing github.com — Port 5.0: Include TrustManager / KeyManager instances in TLS session id context computations (#18256) by chrisvest · Pull Request #18283 · netty/netty Conversation
Member
Motivation: The session_id_context fix for GHSA-6xv6-9mgg-mfvc derived the session_id_context from the Comparing such objects by Modifications:
Result: Sessions can be resumed between server contexts in the same JVM that use the same
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions… computations (netty#18256) Motivation: The session_id_context fix for GHSA-6xv6-9mgg-mfvc derived the session_id_context from the `ClientAuth` mode, the certificate chain and the trusted certificates. Configurations backed by a `TrustManagerFactory`, `KeyManagerFactory`, `TrustManager` or `KeyManager` can not be digested, so a random salt was mixed in for them. That kept them safe, but it also meant sessions could never be resumed between two contexts built from the very same `TrustManager` / `KeyManager` objects, such as SNI virtual hosts or a context that is rebuilt to reload certificates. Comparing such objects by `System.identityHashCode` is not safe, as identity hash codes are not unique, and a collision would let a session be resumed on a context with a different trust configuration. Modifications: - Add `SecureObjectIdentityHash`, which associates 256 bits of `SecureRandom` entropy with the identity of an object, for as long as the object is alive. It uses a new `WeakIdentityHashMap`, as the JDK has no map with both weak keys and identity semantics (at least not in its public API). - Add `SessionIdContextBuilder`, which digests (SHA-256) a domain separation seed, the `ClientAuth` mode, the installed `OpenSslCredentials`, the local identity material (key and certificate chain, or the identity of the `KeyManagerFactory` / `KeyManager`) and the trust material (trusted certificates, or the identity of the `TrustManagerFactory` / `TrustManager`). When a plain `TrustManager` / `KeyManager` is configured, its identity is used instead of the identity of the wrapper factory the builder creates for it, so configuring the same manager twice gives the same result. - Let `SslContextBuilder` and `QuicSslContextBuilder` record the configured material in a `SessionIdContextBuilder`, and pass it on to `ReferenceCountedOpenSslServerContext`, `OpenSslServerContext` and `QuicheQuicSslContext`, which use it to set the `session_id_context`. - Contexts created through the deprecated `SslContext.newServerContext(...)` methods and `OpenSslServerContext` constructors use a random `session_id_context`, as before. - Deprecate the protected-static `SslContext.deriveSessionIdContext(...)`, which is replaced by `SessionIdContextBuilder`. - Add tests for `WeakIdentityHashMap`, using `IdentityHashMap` as an oracle for randomized tests and checking that keys are weakly held, and for `SecureObjectIdentityHash`. Result: Sessions can be resumed between server contexts in the same JVM that use the same `TrustManager` / `KeyManager` (or factory) instances and are otherwise configured identically. Contexts that differ in `ClientAuth` mode, trust or key configuration still get distinct `session_id_context` values.
|
There was an error while loading. Please reload this page.
🚨 All tests passed but jobs failed 🚨Failed Jobs without Test Failures❌ Verify native library loading on musl / musl-verify-alpine-aarch64-gcompat 🏷️ Commit: 9ebe979 Rerun ControlsClick the checkbox to trigger a rerun:
Learn more about TestLens at testlens.app/docs. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.