cleanse stack variable in kdf_pbkdf1_do_derive
authorNeil Horman <nhorman@openssl.org>
Wed, 3 Jan 2024 18:47:05 +0000 (13:47 -0500)
committerNeil Horman <nhorman@openssl.org>
Fri, 5 Jan 2024 19:41:18 +0000 (14:41 -0500)
commit856d4c6ebc1aec2a714ce497af9c3e48c50e689d
treec13cc01da6b9681c5fc4ef38c36f0837a3107c48
parenta693d69cd8b4b88a81f3e8174dcf90bbed4cbb53
cleanse stack variable in kdf_pbkdf1_do_derive

kdf_pbkdf1_do_derive stores key derivation information in a stack
variable, which is left uncleansed prior to returning.  Ensure that the
stack information is zeroed prior to return to avoid potential leaks of
key information

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23194)

(cherry picked from commit 5963aa8c196d7c5a940a979299a07418527932af)
providers/implementations/kdfs/pbkdf1.c