From: William Lallemand Date: Tue, 1 Dec 2026 10:08:08 +0000 (+0000) Subject: BUG/MINOR: ssl: free ech_filedir in ssl_sock_free_ssl_conf() X-Git-Url: https://git.kaiwu.me/http/%22..//%22data:,/%22?a=commitdiff_plain;h=ea832cc8ba1d9bd93fb475cb03afae1d6aacc001;p=haproxy.git 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 ". 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 --- diff --git a/src/ssl_crtlist.c b/src/ssl_crtlist.c index 3b4499f7d..b0885abf6 100644 --- a/src/ssl_crtlist.c +++ b/src/ssl_crtlist.c @@ -78,6 +78,9 @@ void ssl_sock_free_ssl_conf(struct ssl_bind_conf *conf) #endif #if defined(SSL_CTX_set1_client_sigalgs_list) ha_free(&conf->client_sigalgs); +#endif +#ifdef USE_ECH + ha_free(&conf->ech_filedir); #endif } }