]> git.ipfire.org Git - thirdparty/openssl.git/commit
ml-kem: wipe full seed buffer in ml_kem_gen_cleanup
authornkraetzschmar <9020053+nkraetzschmar@users.noreply.github.com>
Tue, 10 Mar 2026 21:33:59 +0000 (22:33 +0100)
committerNorbert Pocs <norbertp@openssl.org>
Fri, 13 Mar 2026 08:41:53 +0000 (09:41 +0100)
commit3d2b2f01f050e6ff3470e00a4344138c4cafe99e
tree000523d89dc1f8534ecbb14b528db52361b10aa7
parent3c0dae181dbdac0e632f7fc8376eddd079e134d6
ml-kem: wipe full seed buffer in ml_kem_gen_cleanup

The gen ctx stores seed material in uint8_t seedbuf[ML_KEM_SEED_BYTES],
where ML_KEM_SEED_BYTES = ML_KEM_RANDOM_BYTES * 2.
When cleanup runs and gctx->seed != NULL, it wiped ML_KEM_RANDOM_BYTES
so clearing only half of the seed buffer.

This change wipes the entire buffer instead.

CLA: trivial

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Fri Mar 13 08:42:00 2026
(Merged from https://github.com/openssl/openssl/pull/30355)
providers/implementations/keymgmt/ml_kem_kmgmt.c