summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Scurrell <[email protected]>2025-05-15 13:35:45 +0100
committerSimon Scurrell <[email protected]>2025-05-15 13:35:45 +0100
commitca0148d02a48d5879837a1c16f53cbeea1e7defe (patch)
tree791a0f948583bab8ea6b9cc8bf6922f6eb1748bd
parentcd34ed2ab2285b17ff3336ab566b9322d08d06ba (diff)
fix: corrected cleanup method call in HKDF implementation to prevent potential buffer overflow due to incorrect pointer being passed to HMAC cleanup if NetX is build with NX_SECURE_KEY_CLEAR defined.
-rw-r--r--crypto_libraries/src/nx_crypto_hkdf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto_libraries/src/nx_crypto_hkdf.c b/crypto_libraries/src/nx_crypto_hkdf.c
index b9d080dc..3ce9e1a9 100644
--- a/crypto_libraries/src/nx_crypto_hkdf.c
+++ b/crypto_libraries/src/nx_crypto_hkdf.c
@@ -172,7 +172,7 @@ UINT status;
if(hmac_method)
{
- status = hmac_method -> nx_crypto_cleanup(hmac_method);
+ status = hmac_method -> nx_crypto_cleanup(hkdf->nx_crypto_hmac_metadata);
if (status != NX_CRYPTO_SUCCESS)
{