]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: ech: keep CLI success messages alive until printed
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 20 Nov 2026 10:06:15 +0000 (10:06 +0000)
committerWilliam Lallemand <wlallemand@haproxy.com>
Fri, 20 Nov 2026 10:09:01 +0000 (11:09 +0100)
commiteb3988570685c5488aa24a3033442284a8690a55
tree803b91cc8a1730e303e0b988afff36c60cd91839
parentb9e3330eb954518a3af035b399614ce376fa36bb
BUG/MINOR: ech: keep CLI success messages alive until printed

The add, set and del ssl ech parsers build their success messages in local
stack buffers and pass them to cli_msg(). This helper only stores the
pointer: the CLI applet prints it after the parser returns, when the
buffer is already out of scope. The success response is therefore read
through a dangling pointer.

Allocate these messages with memprintf() and transfer ownership to
cli_dynmsg(), which frees them after printing or on connection teardown.
Remove the now-unused fixed message size.

Reported by Bruno Henc (@brhenc) in issue #3589.

Fixes issue #3589.
This should be backported to 3.3 and 3.4.
src/ech.c