]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: ssl: free ech_filedir in ssl_sock_free_ssl_conf()
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 1 Dec 2026 10:08:08 +0000 (10:08 +0000)
committerWilliam Lallemand <wlallemand@haproxy.com>
Tue, 1 Dec 2026 10:18:27 +0000 (11:18 +0100)
commitea832cc8ba1d9bd93fb475cb03afae1d6aacc001
tree846bf865f95c48b04445794ef330f5b952773b1e
parente409895493221b19eadc2ab54f041b8930d75251
BUG/MINOR: ssl: free ech_filedir in ssl_sock_free_ssl_conf()

The "ech" parameter of a bind line stores the ECH keys directory in
ssl_bind_conf.ech_filedir, and the bind-level ssl_conf goes through
ssl_sock_free_ssl_conf() in ssl_sock_free_bind_conf(), but the
function never freed the field: the string was leaked at each proxy
stop and start, so on every reload of a configuration using
"bind ... ssl ech <dir>".

Free ech_filedir in ssl_sock_free_ssl_conf(), guarded by USE_ECH like
its assignment in bind_parse_ech().

This must be backported to 3.4, 3.3, 3.2 and 3.1.

Reported-by: Dominik Maier <dmnk@google.com>
src/ssl_crtlist.c