Skip to content
Commit c8ef20fe authored by Zilin Guan's avatar Zilin Guan Committed by Jakub Kicinski
Browse files

tipc: use kfree_sensitive() for aead cleanup



The tipc_aead_free() function currently uses kfree() to release the aead
structure. However, this structure contains sensitive information, such
as key's SALT value, which should be securely erased from memory to
prevent potential leakage.

To enhance security, replace kfree() with kfree_sensitive() when freeing
the aead structure. This change ensures that sensitive data is explicitly
cleared before memory deallocation, aligning with the approach used in
tipc_aead_init() and adhering to best practices for handling confidential
information.

Signed-off-by: default avatarZilin Guan <zilin@seu.edu.cn>
Reviewed-by: default avatarTung Nguyen <tung.quang.nguyen@est.tech>
Link: https://patch.msgid.link/20250523114717.4021518-1-zilin@seu.edu.cn


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 09d7ff06
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment