F-4971: zeroize stack ed448_key after Free in keygen_ed448 cleanup

wc_ed448_free does not zero the struct; add wc_ForceZero(&k, sizeof(k))
immediately after, matching the pattern used for ml_dsa (F-4972) and the
priv[] zeroing already present on the preceding line.
pull/792/head
Daniele Lacamera 2026-06-10 18:51:58 +02:00
parent f20cd3022a
commit 652febdcef
1 changed files with 1 additions and 0 deletions

View File

@ -859,6 +859,7 @@ cleanup:
wc_ForceZero(priv, sizeof(priv));
if (key_init == 0)
wc_ed448_free(&k);
wc_ForceZero(&k, sizeof(k));
if (exit_code != 0)
exit(exit_code);
}