[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200827145221.GB14173@Red>
Date: Thu, 27 Aug 2020 16:52:21 +0200
From: Corentin Labbe <clabbe.montjoie@...il.com>
To: Denis Efremov <efremov@...ux.com>, antoine.tenart@...tlin.com
Cc: linux-crypto@...r.kernel.org,
Herbert Xu <herbert@...dor.apana.org.au>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/4] crypto: inside-secure - use kfree_sensitive()
On Thu, Aug 27, 2020 at 09:43:59AM +0300, Denis Efremov wrote:
> Use kfree_sensitive() instead of open-coding it.
>
> Signed-off-by: Denis Efremov <efremov@...ux.com>
> ---
> drivers/crypto/inside-secure/safexcel_hash.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/crypto/inside-secure/safexcel_hash.c b/drivers/crypto/inside-secure/safexcel_hash.c
> index 16a467969d8e..5ffdc1cd5847 100644
> --- a/drivers/crypto/inside-secure/safexcel_hash.c
> +++ b/drivers/crypto/inside-secure/safexcel_hash.c
> @@ -1082,8 +1082,7 @@ static int safexcel_hmac_init_pad(struct ahash_request *areq,
> }
>
> /* Avoid leaking */
> - memzero_explicit(keydup, keylen);
> - kfree(keydup);
> + kfree_sensitive(keydup);
>
> if (ret)
> return ret;
> --
> 2.26.2
>
The maintainer of this driver was not TO/CC.
I Add him.
Regards
Powered by blists - more mailing lists