Commit e78e141f22 for openssl.org
commit e78e141f22023a2964283209b573c7b185cd867b
Author: slontis <shane.lontis@oracle.com>
Date: Wed Mar 4 14:59:09 2026 +1100
CSHAKE: Fix memory leak related to propq.
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Thu Mar 5 17:41:05 2026
(Merged from https://github.com/openssl/openssl/pull/30261)
diff --git a/providers/implementations/digests/cshake_prov.c b/providers/implementations/digests/cshake_prov.c
index b6a1e4daf7..7dd9c58940 100644
--- a/providers/implementations/digests/cshake_prov.c
+++ b/providers/implementations/digests/cshake_prov.c
@@ -222,6 +222,7 @@ static void cshake_freectx(void *vctx)
{
CSHAKE_CTX *ctx = (CSHAKE_CTX *)vctx;
+ OPENSSL_free(ctx->propq);
EVP_MD_free(ctx->md);
EVP_MD_CTX_destroy(ctx->mdctx);
OPENSSL_clear_free(ctx, sizeof(*ctx));
diff --git a/test/recipes/30-test_evp_data/evpmd_sha.txt b/test/recipes/30-test_evp_data/evpmd_sha.txt
index 75393e5472..fa09135dd0 100644
--- a/test/recipes/30-test_evp_data/evpmd_sha.txt
+++ b/test/recipes/30-test_evp_data/evpmd_sha.txt
@@ -455,6 +455,7 @@ Digest = CSHAKE-256
Input = 13D101DA
Ctrl = function-name:TupleHash
Ctrl = customization:q8gN}O&V*VDU4Y.^5J13tG2,1^Lw~C2rw $AB3.SX)=@z
+Ctrl = properties:?fips=true
Output = 43163A57FC1EE8F1C501A2ADD927698CA5A4B52C0D3EF3FD6D91D8D2386765E0AE
FIPSversion = >=4.0.0