]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: ssl: Destroy ckch instances before the store during deinit
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Wed, 7 Feb 2024 15:38:44 +0000 (16:38 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Wed, 7 Feb 2024 16:10:31 +0000 (17:10 +0100)
commita290db5706e76f4cdfd20067a8e73805acddeb65
tree9c4d47f5f0ce6e40b7861691c7c48f775346194e
parentbefebf8b5123a1dd88d7d11298d63356f15d87b8
BUG/MINOR: ssl: Destroy ckch instances before the store during deinit

The ckch_store's free'ing function might end up calling
'ssl_sock_free_ocsp' if the corresponding certificate had ocsp data.
This ocsp cleanup function expects for the 'refcount_instance' member of
the certificate_ocsp structure to be 0, meaning that no live
ckch instance kept a reference on this certificate_ocsp structure.
But since in ckch_store_free we were destroying the ckch_data before
destroying the linked instances, the BUG_ON would fail during a standard
deinit. Reversing the cleanup order fixes the problem.

Must be backported to 2.8.
src/ssl_ckch.c