]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: ssl: fix error path on generate-certificates
authorWilliam Lallemand <wlallemand@haproxy.com>
Wed, 21 Jan 2026 06:03:03 +0000 (07:03 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Wed, 21 Jan 2026 09:45:22 +0000 (10:45 +0100)
commitfbc98ebcdaefd4c024b33194640350ba0c348567
tree6c23138ae1e67365297e08e7e2a4912270030aa6
parent2d8d2b42472da920b6b3c077634195e076a9c435
BUG/MEDIUM: ssl: fix error path on generate-certificates

It was reported by Przemyslaw Bromber that using the "generate-certificates"
option combined with AWS-LC would crash HAProxy when a request is done with a
SNI longer than 64 bytes.

The problem is that the certificate is generated with a CN greater than 64
bytes which results in ssl_sock_do_create_cert() returning NULL. This
NULL value being passed to SSL_set_SSL_CTX.

With OpenSSL, passing a NULL SSL_CTX does not seem to be an issue as it
would just ignore it.

With AWS_LC, passing a NULL seems to crash the function. This was
reported to upstream AWS-LC and fixed in patch 7487ad1dcd8
https://github.com/aws/aws-lc/pull/2946.

This must be backported in every branches.
src/ssl_gencert.c