projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-5.12/i2c-hid' into for-linus
[linux-2.6-microblaze.git]
/
net
/
ceph
/
crypto.c
diff --git
a/net/ceph/crypto.c
b/net/ceph/crypto.c
index
4f75df4
..
92d89b3
100644
(file)
--- a/
net/ceph/crypto.c
+++ b/
net/ceph/crypto.c
@@
-96,6
+96,7
@@
int ceph_crypto_key_decode(struct ceph_crypto_key *key, void **p, void *end)
key->len = ceph_decode_16(p);
ceph_decode_need(p, end, key->len, bad);
ret = set_secret(key, *p);
key->len = ceph_decode_16(p);
ceph_decode_need(p, end, key->len, bad);
ret = set_secret(key, *p);
+ memzero_explicit(*p, key->len);
*p += key->len;
return ret;
*p += key->len;
return ret;
@@
-134,7
+135,7
@@
int ceph_crypto_key_unarmor(struct ceph_crypto_key *key, const char *inkey)
void ceph_crypto_key_destroy(struct ceph_crypto_key *key)
{
if (key) {
void ceph_crypto_key_destroy(struct ceph_crypto_key *key)
{
if (key) {
- kfree(key->key);
+ kfree
_sensitive
(key->key);
key->key = NULL;
if (key->tfm) {
crypto_free_sync_skcipher(key->tfm);
key->key = NULL;
if (key->tfm) {
crypto_free_sync_skcipher(key->tfm);