From: "Stephan Müller" <smueller@chronox.de>
To: Pirabarlen-Cheenaramen <selven@hackers.mu>
Cc: linux-crypto@vger.kernel.org
Subject: Re: [PATCH] crypto: testmgr: clean up memory for sensitive information
Date: Sun, 23 Apr 2017 21:08:51 +0200 [thread overview]
Message-ID: <6071972.fa1OB9bQHi@positron.chronox.de> (raw)
In-Reply-To: <20170422234056.GA25272@hackers.mu>
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
prev parent reply other threads:[~2017-04-23 19:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6071972.fa1OB9bQHi@positron.chronox.de \
--to=smueller@chronox.de \
--cc=linux-crypto@vger.kernel.org \
--cc=selven@hackers.mu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.