From 571d78361ac8bdca44d15a96935c613588719f79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 27 Feb 2026 10:17:28 +0100 Subject: [PATCH] PK: zeroize dummy signature just to be sure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The signature of a dummy hash for which no pre-image is know is probably not sensitive, but zeroize it anyway. Signed-off-by: Manuel Pégourié-Gonnard --- library/pk_wrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/pk_wrap.c b/library/pk_wrap.c index c174ce3b42..cafcb87d0d 100644 --- a/library/pk_wrap.c +++ b/library/pk_wrap.c @@ -1365,7 +1365,7 @@ static int rsa_alt_check_pair(mbedtls_pk_context *pub, mbedtls_pk_context *prv, } cleanup: - mbedtls_free(sig); + mbedtls_zeroize_and_free(sig, sig_size); return ret; } #endif /* MBEDTLS_RSA_C */