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]
Date:   Tue, 28 Nov 2017 10:10:55 +0100
From:   Stephan Mueller <smueller@...onox.de>
To:     Eric Biggers <ebiggers3@...il.com>
Cc:     syzbot 
        <bot+ff72ab869817b6ea60bc570f638ee030f4fc73e5@...kaller.appspotmail.com>,
        davem@...emloft.net, herbert@...dor.apana.org.au,
        linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
        syzkaller-bugs@...glegroups.com
Subject: Re: general protection fault in af_alg_free_areq_sgls

Am Dienstag, 28. November 2017, 10:02:52 CET schrieb Eric Biggers:

Hi Eric,

> ---
>  crypto/af_alg.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/crypto/af_alg.c b/crypto/af_alg.c
> index 358749c38894..415a54ced4d6 100644
> --- a/crypto/af_alg.c
> +++ b/crypto/af_alg.c
> @@ -672,14 +672,15 @@ void af_alg_free_areq_sgls(struct af_alg_async_req
> *areq) }
> 
>  	tsgl = areq->tsgl;
> -	for_each_sg(tsgl, sg, areq->tsgl_entries, i) {
> -		if (!sg_page(sg))
> -			continue;
> -		put_page(sg_page(sg));
> -	}
> +	if (tsgl) {
> +		for_each_sg(tsgl, sg, areq->tsgl_entries, i) {
> +			if (!sg_page(sg))
> +				continue;
> +			put_page(sg_page(sg));
> +		}
> 
> -	if (areq->tsgl && areq->tsgl_entries)

Why do you want to remove the check for areq->tsgl_entries? I know in the 
current code that cannot happen. But it should be caught in case of a 
programming error.

Thus, should we add a BUG_ON(!areq->tsgl_entries)?

Otherwise:

Reviewed-by: Stephan Mueller <smueller@...onox.de>

Ciao
Stephan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ