diff options
author | Loganaden Velvindron <logan@hackers.mu> | 2017-06-08 14:50:04 +0100 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2017-06-09 13:29:50 +1000 |
commit | da7798a7b6714cf35ea6084ad6b1fe0497566cf2 (patch) | |
tree | 56b8379135ea0bad41b3f5d4314e02d06d24a148 /crypto | |
parent | a77395447b0aeab9473a066ff28fbee01130206b (diff) | |
download | linux-da7798a7b6714cf35ea6084ad6b1fe0497566cf2.tar.gz linux-da7798a7b6714cf35ea6084ad6b1fe0497566cf2.tar.bz2 linux-da7798a7b6714cf35ea6084ad6b1fe0497566cf2.zip |
crypto : asymmetric_keys : verify_pefile:zero memory content before freeing
Signed-off-by: Loganaden Velvindron <logan@hackers.mu>
Signed-off-by: Yasir Auleear <yasirmx@hackers.mu>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/asymmetric_keys/verify_pefile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/asymmetric_keys/verify_pefile.c b/crypto/asymmetric_keys/verify_pefile.c index 672a94c2c3ff..d178650fd524 100644 --- a/crypto/asymmetric_keys/verify_pefile.c +++ b/crypto/asymmetric_keys/verify_pefile.c @@ -381,7 +381,7 @@ static int pefile_digest_pe(const void *pebuf, unsigned int pelen, } error: - kfree(desc); + kzfree(desc); error_no_desc: crypto_free_shash(tfm); kleave(" = %d", ret); @@ -450,6 +450,6 @@ int verify_pefile_signature(const void *pebuf, unsigned pelen, ret = pefile_digest_pe(pebuf, pelen, &ctx); error: - kfree(ctx.digest); + kzfree(ctx.digest); return ret; } |