]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: ssl: Fix potential NULL-deref in "dump ssl cert" with AWS-LC
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Mon, 5 Oct 2026 13:37:36 +0000 (15:37 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Wed, 7 Oct 2026 14:15:50 +0000 (16:15 +0200)
commit19a5382e0022b3e79baef4194961997acb251a96
tree179b87471c650068b7044c1e4e0cff43ec9ff96b
parent2b270877393b98b7b2077447d98ba9be29874027
BUG/MINOR: ssl: Fix potential NULL-deref in "dump ssl cert" with AWS-LC

In some corner cases we could have a public certificate with no private
key stored in a crt-store. In such a case, when trying to dump the
contents of the store entry via the "dump ssl cert" CLI command, the
'PEM_write_bio_PrivateKey' was always called without checking for a NULL
pointer.
This poses no problems with OpenSSL libraries which already check the
pointer but on some other libs, AWS-LC for instance, the NULL pointer is
dereferenced without check.
The only other use of this function is in acme code where the function
can never be called with a NULL 'key' pointer.

This patch can be backported up to 3.2.
src/ssl_ckch.c