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: <ZrWbCnhg1XYIk5IB@gondor.apana.org.au>
Date: Fri, 9 Aug 2024 12:28:58 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Roman Smirnov <r.smirnov@....ru>
Cc: "lvc-project@...uxtesting.org" <lvc-project@...uxtesting.org>,
	"linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
	"davem@...emloft.net" <davem@...emloft.net>,
	Sergey Shtylyov <s.shtylyov@....ru>,
	"zohar@...ux.ibm.com" <zohar@...ux.ibm.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] crypto: mpi: add NULL checks to mpi_normalize().

On Wed, Aug 07, 2024 at 02:20:36PM +0000, Roman Smirnov wrote:
>
> Svace found a similar case but it is no longer relevant:
> 
> NULL constant:
>     mpi_ec_mul_point()
>       ec_mulm(z3, point->z, z2, ctx)
>         ec_mod()
>           mpi_mod()
>             mpi_fdiv_r()
>               mpi_tdiv_r()
>                 mpi_tdiv_qr()
>                   mpi_resize()
>                     kcalloc()

In general, I think it's better to deal with the error at the
point of allocation.  So whoever calls mpi_resize should check
for errors and return an error if appropriate.

We can deal with this if this function is ever reintroduced.

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