From ca0148d02a48d5879837a1c16f53cbeea1e7defe Mon Sep 17 00:00:00 2001 From: Simon Scurrell Date: Thu, 15 May 2025 13:35:45 +0100 Subject: 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. --- crypto_libraries/src/nx_crypto_hkdf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- cgit v1.3.1