]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: ssl/cli: reset the transaction on interrupted CA/CRL commits
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 25 Nov 2026 16:35:16 +0000 (17:35 +0100)
committerOlivier Houchard <cognet@ci0.org>
Wed, 25 Nov 2026 16:23:12 +0000 (17:23 +0100)
commit24e2ea37525d718fece01ae9ff8b68c4d36281de
treef0ce4461e53e9697c9906600c3acd94b53f49dd4
parentab5137a645c76e61f3802877da337d75b8e2244e
BUG/MEDIUM: ssl/cli: reset the transaction on interrupted CA/CRL commits

As was fixed for certificates in commit ca42c37bc ("BUG/MEDIUM: ssl/cli:
reset the ongoing transaction when "commit ssl cert" is interrupted"),
when a "commit ssl ca-file" or "commit ssl crl-file" applet is released
before the end, e.g. because the CLI client left while it was yielding,
the release function frees the new entry but the transaction still
references it, or the old entry, already freed once the new one is
inserted. The next "show", "set", "commit" or "abort" on that file then
uses freed memory, which crashes the process.

Let's reset the transaction in the release functions when the applet did
not reach CACRL_ST_FIN. This was introduced in 2.5 with the commands, by
commits a32a68bd3 ("MEDIUM: ssl: Add "set+commit ssl ca-file" CLI
commands") and a51b339d9 ("MEDIUM: ssl: Add "set+commit ssl crl-file" CLI
commands"), so this should be backported to all stable branches.
src/ssl_ckch.c