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.
This commit is contained in:
Juliusz Sosinowicz
2026-06-01 18:32:54 +02:00
parent 118d3a8226
commit 108b120d7f
+1
View File
@@ -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