]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: ssl: free curves, sigalgs and client_sigalgs in srv_parse_*()
authorWilliam Lallemand <wlallemand@irq6.net>
Sun, 27 Sep 2026 19:02:22 +0000 (19:02 +0000)
committerWilliam Lallemand <wlallemand@irq6.net>
Sun, 27 Sep 2026 19:02:22 +0000 (19:02 +0000)
commitcd6c78247ee99f9f513d848fc1476b6bbb31f72f
treefd25cc6189fb84aff383e46fa8a21324b00fae1a
parent250e6ff1577c8a7329ee0d274d44bfffe179ab58
BUG/MINOR: ssl: free curves, sigalgs and client_sigalgs in srv_parse_*()

When curves, sigalgs, or client-sigalgs are parsed on a server line,
the string allocated via strdup() was assigned directly to
newsrv->ssl_ctx without releasing any prior value.

If the server inherited these SSL settings from default-server via
srv_ssl_settings_cpy(), or if the keyword was specified multiple
times on the same server line, the previous string was overwritten
and leaked.

Free the previous pointers using ha_free() before assigning the new
strdup() value in srv_parse_curves(), srv_parse_sigalgs(), and
srv_parse_client_sigalgs().

This change should be backported to all supported branches.
src/cfgparse-ssl.c