projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7686762
)
s390/crypto: use kfree_sensitive() instead of kfree()
author
Wang Ming
<machel@vivo.com>
Mon, 17 Jul 2023 09:45:19 +0000
(17:45 +0800)
committer
Heiko Carstens
<hca@linux.ibm.com>
Thu, 20 Jul 2023 14:48:56 +0000
(16:48 +0200)
key might contain private part of the key, so better use
kfree_sensitive() to free it.
Signed-off-by: Wang Ming <machel@vivo.com>
Reviewed-by: Harald Freudenberger <freude@linux.ibm.com>
Link:
https://lore.kernel.org/r/20230717094533.18418-1-machel@vivo.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/crypto/paes_s390.c
patch
|
blob
|
history
diff --git
a/arch/s390/crypto/paes_s390.c
b/arch/s390/crypto/paes_s390.c
index
d29a9d9
..
3834915
100644
(file)
--- a/
arch/s390/crypto/paes_s390.c
+++ b/
arch/s390/crypto/paes_s390.c
@@
-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;
}
}