]> git.kaiwu.me - nginx.git/commit
SNI: added restriction for TLSv1.3 cross-SNI session resumption.
authorSergey Kandaurov <pluknet@nginx.com>
Wed, 22 Jan 2025 14:55:44 +0000 (18:55 +0400)
committerpluknet <pluknet@nginx.com>
Wed, 5 Feb 2025 16:11:42 +0000 (20:11 +0400)
commit46b9f5d389447b3b822ea71f5ac86ebc316c2975
tree0e0b53b482a13f3846c519d778907bc2dc795f24
parent22a2a225ba87029f0e7bbc09a80ff7cdad23399d
SNI: added restriction for TLSv1.3 cross-SNI session resumption.

In OpenSSL, session resumption always happens in the default SSL context,
prior to invoking the SNI callback.  Further, unlike in TLSv1.2 and older
protocols, SSL_get_servername() returns values received in the resumption
handshake, which may be different from the value in the initial handshake.
Notably, this makes the restriction added in b720f650b insufficient for
sessions resumed with different SNI server name.

Considering the example from b720f650b, previously, a client was able to
request example.org by presenting a certificate for example.org, then to
resume and request example.com.

The fix is to reject handshakes resumed with a different server name, if
verification of client certificates is enabled in a corresponding server
configuration.
src/http/ngx_http_request.c
src/stream/ngx_stream_ssl_module.c