lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4206a7e79f32538e2505722ef4b57386@linux.ibm.com>
Date:   Mon, 17 Jul 2023 12:47:00 +0200
From:   Harald Freudenberger <freude@...ux.ibm.com>
To:     Wang Ming <machel@...o.com>
Cc:     Herbert Xu <herbert@...dor.apana.org.au>,
        "David S. Miller" <davem@...emloft.net>,
        Heiko Carstens <hca@...ux.ibm.com>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Alexander Gordeev <agordeev@...ux.ibm.com>,
        Christian Borntraeger <borntraeger@...ux.ibm.com>,
        Sven Schnelle <svens@...ux.ibm.com>,
        linux-crypto@...r.kernel.org, linux-s390@...r.kernel.org,
        linux-kernel@...r.kernel.org, opensource.kernel@...o.com
Subject: Re: [PATCH v1] arch: s390: Use kfree_sensitive instead of kfree

On 2023-07-17 11:45, Wang Ming wrote:
> key might contain private part of the key, so better use
> kfree_sensitive to free it.
> 
> Signed-off-by: Wang Ming <machel@...o.com>
> ---
>  arch/s390/crypto/paes_s390.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/s390/crypto/paes_s390.c 
> b/arch/s390/crypto/paes_s390.c
> index d29a9d908797..38349150c96e 100644
> --- a/arch/s390/crypto/paes_s390.c
> +++ b/arch/s390/crypto/paes_s390.c
> @@ -103,7 +103,7 @@ static inline void _free_kb_keybuf(struct key_blob 
> *kb)
>  {
>  	if (kb->key && kb->key != kb->keybuf
>  	    && kb->keylen > sizeof(kb->keybuf)) {
> -		kfree(kb->key);
> +		kfree_sensitive(kb->key);
>  		kb->key = NULL;
>  	}
>  }

Reviewed-by: Harald Freudenberger <freude@...ux.ibm.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ