]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: ssl: crt-list ciphers ignored with AWS-LC 20260917-ssl-issue-3500
authorFrederic Lecaille <flecaille@haproxy.com>
Fri, 18 Sep 2026 15:40:52 +0000 (17:40 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Fri, 18 Sep 2026 16:09:23 +0000 (18:09 +0200)
commitee2e7a6ec8b2e1c87d21363e8491ed39688407ad
tree5d74860788b3d3ce6965ccdb9b89dd144508749d
parentb200e1bd8b2bf28e10c36913a79cd9b1e3124b10
BUG/MEDIUM: ssl: crt-list ciphers ignored with AWS-LC

Since AWS-LC 1.47.0, SSL_new() copies the cipher lists of the SSL_CTX into
the SSL object, and SSL_set_SSL_CTX() does not update this copy while the
server handshake uses it. The "ciphers" and "ciphersuites" options of a
crt-list line were thus silently ignored: a client could negotiate a cipher
excluded by the certificate as long as the bind line allowed it. The same
configuration built against OpenSSL rejects such a connection.

ssl_sock_switchctx_set_ciphers() now sets both lists again on the SSL
object after the context switch.

Below AWS-LC 1.46 both lists of an SSL object share the same field, so
setting the ciphersuites would erase the ciphers. AWSLC_API_VERSION cannot
tell these versions apart, it stays at 32 from 1.44 to 1.49.
ssl_sock_check_awslc_cipher_lists() therefore checks the behaviour once at
startup, and the ciphersuites are only set when the two lists are separate.
Those older versions do not need the fix anyway, their handshake reads the
lists of the SSL_CTX, which the switch already updated.

This adds the ssl_crt-list_ciphers reg-test for TLSv1.2 and the
ssl_crt-list_ciphersuites ones for TLSv1.3, over TCP and QUIC.

Thank you to @ygkat for having reported this issue in GH #3500

This should be backported as far as 3.0. Note the code is in ssl_sock.c
before 3.1.
reg-tests/quic/ssl_crt-list_ciphersuites.vtc [new file with mode: 0644]
reg-tests/ssl/certs/ciphers.crt-list [new file with mode: 0644]
reg-tests/ssl/certs/ciphersuites.crt-list [new file with mode: 0644]
reg-tests/ssl/ssl_crt-list_ciphers.vtc [new file with mode: 0644]
reg-tests/ssl/ssl_crt-list_ciphersuites.vtc [new file with mode: 0644]
reg-tests/ssl/ssl_crt-list_ciphersuites.vtci [new file with mode: 0644]
src/ssl_clienthello.c