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: <20210816075346.GA10906@gondor.apana.org.au>
Date:   Mon, 16 Aug 2021 15:53:46 +0800
From:   Herbert Xu <herbert@...dor.apana.org.au>
To:     Dongliang Mu <mudongliangabcd@...il.com>
Cc:     Steffen Klassert <steffen.klassert@...unet.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        syzbot+b9cfd1cc5d57ee0a09ab@...kaller.appspotmail.com,
        stable@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: xfrm: fix bug in ipcomp_free_scratches

On Mon, Aug 16, 2021 at 03:38:29PM +0800, Dongliang Mu wrote:
>
> -	for_each_possible_cpu(i)
> -		vfree(*per_cpu_ptr(scratches, i));
> +	for_each_possible_cpu(i) {
> +		void *scratch = *per_cpu_ptr(scratches, i);
> +		if (!scratch)
> +			vfree(scratch);
> +	}

This patch is unnecessary.  Please check the implementation of
vfree, it already checks for NULL pointers just like most of our
free primitives.

Cheers,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ