]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: server/ssl: Unset the SNI for new server connections if none is set
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 24 Nov 2025 13:41:54 +0000 (14:41 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 25 Nov 2025 15:32:46 +0000 (16:32 +0100)
commitde29000e602bda55d32c266252ef63824e838ac0
tree10ff33c5c36982b9d3f368f1256bed07ba05b84c
parenta70816da82ce84ba9792ba93313bdad46c1b8ec9
BUG/MEDIUM: server/ssl: Unset the SNI for new server connections if none is set

When a new SSL server connection is created, if no SNI is set, it is
possible to inherit from the one of the reused TLS session. The bug was
introduced by the commit 95ac5fe4a ("MEDIUM: ssl_sock: always use the SSL's
server name, not the one from the tid"). The mixup is possible between
regular connections but also with health-checks connections.

To fix the issue, when no SNI is set, for regular server connections and for
health-check connections, the SNI must explicitly be disabled by calling
ssl_sock_set_servername() with the hostname set to NULL.

Many thanks to Lukas for his detailed bug report.

This patch should fix the issue #3195. It must be backported as far as 3.0.
src/backend.c
src/tcpcheck.c