* [PATCH] crypto: testmgr: clean up memory for sensitive information
@ 2017-04-22 23:40 Pirabarlen-Cheenaramen
2017-04-23 19:08 ` Stephan Müller
0 siblings, 1 reply; 2+ messages in thread
From: Pirabarlen-Cheenaramen @ 2017-04-22 23:40 UTC (permalink / raw)
To: linux-crypto
Signed-off-by: Pirabarlen-Cheenaramen <selven@hackers.mu>
---
crypto/testmgr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index cd075c7..0af2e16 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -953,8 +953,8 @@ static int __test_aead(struct crypto_aead *tfm, int enc,
out_noaxbuf:
testmgr_free_buf(xbuf);
out_noxbuf:
- kfree(key);
- kfree(iv);
+ kzfree(key);
+ kzfree(iv);
return ret;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: testmgr: clean up memory for sensitive information
2017-04-22 23:40 [PATCH] crypto: testmgr: clean up memory for sensitive information Pirabarlen-Cheenaramen
@ 2017-04-23 19:08 ` Stephan Müller
0 siblings, 0 replies; 2+ messages in thread
From: Stephan Müller @ 2017-04-23 19:08 UTC (permalink / raw)
To: Pirabarlen-Cheenaramen; +Cc: linux-crypto
Am Sonntag, 23. April 2017, 01:40:56 CEST schrieb Pirabarlen-Cheenaramen:
Hi Pirabarlen,
> Signed-off-by: Pirabarlen-Cheenaramen <selven@hackers.mu>
> ---
> crypto/testmgr.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/crypto/testmgr.c b/crypto/testmgr.c
> index cd075c7..0af2e16 100644
> --- a/crypto/testmgr.c
> +++ b/crypto/testmgr.c
> @@ -953,8 +953,8 @@ static int __test_aead(struct crypto_aead *tfm, int enc,
> out_noaxbuf:
> testmgr_free_buf(xbuf);
> out_noxbuf:
> - kfree(key);
> - kfree(iv);
> + kzfree(key);
> + kzfree(iv);
> return ret;
Hm, I do not think that key or IV are sensitive in this case.
memcpy(key, template[i].key, template[i].klen);
if (template[i].iv)
memcpy(iv, template[i].iv, iv_len);
else
memset(iv, 0, MAX_IVLEN);
Ciao
Stephan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-23 19:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-22 23:40 [PATCH] crypto: testmgr: clean up memory for sensitive information Pirabarlen-Cheenaramen
2017-04-23 19:08 ` Stephan Müller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).