Commit 258d3a695e for openssl.org
commit 258d3a695e32828df7dbda6ee9ae67d31e128f62
Author: Norbert Pocs <norbertp@openssl.org>
Date: Wed May 28 16:28:54 2025 +0200
quic_tls.c: Precede double free on EVP_MD variable
When external quic implementation is used, the variable is not used and
double free happens whe the yield_secret_cb fails.
Resolves: #27504
Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27713)
diff --git a/ssl/quic/quic_tls.c b/ssl/quic/quic_tls.c
index d31c93dcf9..0cf2adbf5f 100644
--- a/ssl/quic/quic_tls.c
+++ b/ssl/quic/quic_tls.c
@@ -177,6 +177,8 @@ quic_new_record_layer(OSSL_LIB_CTX *libctx, const char *propq, int vers,
if (!ossl_assert("Should not happen" == NULL))
goto err;
#endif
+ } else {
+ kdfdigest = NULL;
}
if (!rl->qtls->args.yield_secret_cb(level, qdir, suite_id,