]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: ssl/cli: don't unlock the certificate lock after a failed trylock
authorWilliam Lallemand <wlallemand@irq6.net>
Tue, 3 Nov 2026 16:53:09 +0000 (16:53 +0000)
committerWilliam Lallemand <wlallemand@irq6.net>
Tue, 3 Nov 2026 16:58:36 +0000 (16:58 +0000)
commit7363d51c267705111758d9b767bdbfe6cf6257e3
tree570fc3681e430da96c5296f24efacc07e1b4ddaa
parentca42c37bcc146e7935a5a1114d443ba94d31b6c9
BUG/MEDIUM: ssl/cli: don't unlock the certificate lock after a failed trylock

When ckch_store_load_payload() fails to acquire ckch_lock, it jumps to
the common cleanup path, which unconditionally releases the lock. This
unlocks another operation's lock and returns success because errcode is
still zero. When the actual owner subsequently unlocks, the lock state
underflows and later certificate commands remain blocked.

Return ERR_ALERT | ERR_FATAL immediately on failed lock acquisition. No
temporary resources have been allocated at this point, so cleanup is
unnecessary.

This regression was introduced in 3.4-dev11 by commit efe6c97488, which
extracted ckch_store_load_payload() from the CLI parser. This fix should
be backported to 3.4 only. Versions 3.3 and older return directly on
failed lock acquisition and are not affected.
src/ssl_ckch.c