[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <149692980440.11452.10627624845628502682.stgit@warthog.procyon.org.uk>
Date: Thu, 08 Jun 2017 14:50:04 +0100
From: David Howells <dhowells@...hat.com>
To: jmorris@...ei.org
Cc: Yasir Auleear <yasirmx@...kers.mu>, linux-kernel@...r.kernel.org,
Loganaden Velvindron <logan@...kers.mu>, dhowells@...hat.com,
linux-security-module@...r.kernel.org, keyrings@...r.kernel.org
Subject: [PATCH 22/23] crypto : asymmetric_keys : verify_pefile:zero memory
content before freeing
From: Loganaden Velvindron <logan@...kers.mu>
Signed-off-by: Loganaden Velvindron <logan@...kers.mu>
Signed-off-by: Yasir Auleear <yasirmx@...kers.mu>
Signed-off-by: David Howells <dhowells@...hat.com>
---
crypto/asymmetric_keys/verify_pefile.c | 4 ++--
1 file 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;
}
Powered by blists - more mailing lists