]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: ssl: isolate TLS session resumption per authentication policy
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 18 Aug 2026 07:26:53 +0000 (07:26 +0000)
committerWilliam Lallemand <wlallemand@haproxy.com>
Tue, 18 Aug 2026 12:08:17 +0000 (14:08 +0200)
commit4a8f762204bba85064a8b1c4355f56d4b857787c
treee016715308c9af96c2abbd679c28b2177215941d
parent52bdd0d02f04d50a6cedd00a9483ee16788a41fd
BUG/MEDIUM: ssl: isolate TLS session resumption per authentication policy

The session id context OpenSSL uses to allow or reject
session resumption) was so far scoped only to the frontend's own
certificate. Two SSL_CTXs presenting the same certificate but different
client-certificate policies (verify mode, ca-file, crl-file,
ca/crt-ignore-err) still shared that sid_ctx, so a session or ticket
obtained on a weakly-verified listener could be resumed on another
listener enforcing stricter mutual TLS, without ever re-presenting a
certificate.

Fix this by also hashing the verify mode, every CA certificate and CRL
loaded in the SSL_CTX's X509_STORE (ssl_ctx_hash_store()), and the
ca/crt-ignore-err bitfields into sid_ctx. CA certificates are hashed
the same way as leaf certificate (issuer/subject/serial); CRLs are
hashed by issuer and CRL Number extension.

Must be backported to every stable branch.

Reported-by: Yiyi Wang <wangyiyi25@mails.tsinghua.edu.cn>
Reported-by: Chris Jarrett-Davies <chrisjd@openai.com>
src/ssl_sock.c