From 108b120d7fd3271af2d086ce46b81907660d7f5f Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Mon, 1 Jun 2026 18:32:54 +0200 Subject: [PATCH] F-5632: zeroize Camellia key schedule on cipher free FreeCiphersSide freed cipher->cam with XFREE only, leaving the expanded key schedule and IV in freed heap memory. Call wc_CamelliaFree (which ForceZeros the context) before XFREE, matching the ARIA cleanup above. --- src/internal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/internal.c b/src/internal.c index dcd8fa8ab6..ccea4c0271 100644 --- a/src/internal.c +++ b/src/internal.c @@ -3282,6 +3282,7 @@ static void FreeCiphersSide(Ciphers *cipher, void* heap) cipher->aria = NULL; #endif #ifdef HAVE_CAMELLIA + wc_CamelliaFree(cipher->cam); XFREE(cipher->cam, heap, DYNAMIC_TYPE_CIPHER); cipher->cam = NULL; #endif