Commit 1f7e9067 authored by Wang Ming's avatar Wang Ming Committed by Heiko Carstens

s390/crypto: use kfree_sensitive() instead of kfree()

key might contain private part of the key, so better use
kfree_sensitive() to free it.
Signed-off-by: default avatarWang Ming <machel@vivo.com>
Reviewed-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
Link: https://lore.kernel.org/r/20230717094533.18418-1-machel@vivo.comSigned-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent 7686762d
......@@ -103,7 +103,7 @@ static inline void _free_kb_keybuf(struct key_blob *kb)
{
if (kb->key && kb->key != kb->keybuf
&& kb->keylen > sizeof(kb->keybuf)) {
kfree(kb->key);
kfree_sensitive(kb->key);
kb->key = NULL;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment