summaryrefslogtreecommitdiff
path: root/crypto/asymmetric_keys
diff options
context:
space:
mode:
authorLoganaden Velvindron <logan@hackers.mu>2017-06-08 16:50:04 +0300
committerJames Morris <james.l.morris@oracle.com>2017-06-09 06:29:50 +0300
commitda7798a7b6714cf35ea6084ad6b1fe0497566cf2 (patch)
tree56b8379135ea0bad41b3f5d4314e02d06d24a148 /crypto/asymmetric_keys
parenta77395447b0aeab9473a066ff28fbee01130206b (diff)
downloadlinux-da7798a7b6714cf35ea6084ad6b1fe0497566cf2.tar.xz
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/asymmetric_keys')
-rw-r--r--crypto/asymmetric_keys/verify_pefile.c4
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;
}