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] [day] [month] [year] [list]
Message-ID: <aPH7puE_qyvONCcx@gondor.apana.org.au>
Date: Fri, 17 Oct 2025 16:17:42 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Guangshuo Li <lgs201920130244@...il.com>
Cc: Horia Geantă <horia.geanta@....com>,
	Pankaj Gupta <pankaj.gupta@....com>,
	Gaurav Jain <gaurav.jain@....com>,
	"David S. Miller" <davem@...emloft.net>,
	"Victoria Milhoan (b42089)" <vicki.milhoan@...escale.com>,
	Dan Douglass <dan.douglass@....com>,
	Meenakshi Aggarwal <meenakshi.aggarwal@....com>,
	linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
	stable@...r.kernel.org
Subject: Re: [PATCH v3] crypto: caam: Add check for kcalloc() in test_len()

On Tue, Sep 23, 2025 at 08:44:18PM +0800, Guangshuo Li wrote:
> As kcalloc() may fail, check its return value to avoid a NULL pointer
> dereference when passing the buffer to rng->read(). On allocation
> failure, log the error and return since test_len() returns void.
> 
> Fixes: 2be0d806e25e ("crypto: caam - add a test for the RNG")
> Cc: stable@...r.kernel.org
> Signed-off-by: Guangshuo Li <lgs201920130244@...il.com>
> ---
> changelog:
> v3:
> - Fix build error: test_len() returns void; return without a value.
> - No functional changes beyond the allocation failure path.
> 
> v2:
> - Return on allocation failure to avoid possible NULL dereference.
> ---
>  drivers/crypto/caam/caamrng.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Patch applied.  Thanks.
-- 
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