Re: WARNING: CPU: 1 PID: 81 at crypto/testmgr.c:5931 alg_test+0x2a4/0x300 (Thinkpad T60, v6.12-rc2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 15, 2024 at 08:08:50PM +0200, Erhard Furtner wrote:
>
> v6.12-rc3 still affected. So I bisected the issue to the following commit:
> 
>  # git bisect good
> 5a72a244bac3e8663834d88bb0b4f9069203e5e0 is the first bad commit
> commit 5a72a244bac3e8663834d88bb0b4f9069203e5e0
> Author: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Date:   Sat Aug 10 14:21:02 2024 +0800
> 
>     crypto: rsa - Check MPI allocation errors
>     
>     Fixes: 6637e11e4ad2 ("crypto: rsa - allow only odd e and restrict value in FIPS mode")
>     Fixes: f145d411a67e ("crypto: rsa - implement Chinese Remainder Theorem for faster private key operation")
>     Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> 
>  crypto/rsa.c | 19 ++++++++++++-------
>  1 file changed, 12 insertions(+), 7 deletions(-)
> 
> 
> Reverting 5a72a244bac3e8663834d88bb0b4f9069203e5e0 on top of v6.12-rc3 fixes the failure.

Thanks.

This patch should fix the problem and I'll push it into 6.12-rc.

commit 6100da511bd21d3ccb0a350c429579e8995a830e
Author: Qianqiang Liu <qianqiang.liu@xxxxxxx>
Date:   Fri Sep 13 22:07:42 2024 +0800

    crypto: lib/mpi - Fix an "Uninitialized scalar variable" issue
    
    The "err" variable may be returned without an initialized value.
    
    Fixes: 8e3a67f2de87 ("crypto: lib/mpi - Add error checks to extension")
    Signed-off-by: Qianqiang Liu <qianqiang.liu@xxxxxxx>
    Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

diff --git a/lib/crypto/mpi/mpi-mul.c b/lib/crypto/mpi/mpi-mul.c
index 892a246216b9..7e6ff1ce3e9b 100644
--- a/lib/crypto/mpi/mpi-mul.c
+++ b/lib/crypto/mpi/mpi-mul.c
@@ -21,7 +21,7 @@ int mpi_mul(MPI w, MPI u, MPI v)
 	int usign, vsign, sign_product;
 	int assign_wp = 0;
 	mpi_ptr_t tmp_limb = NULL;
-	int err;
+	int err = 0;
 
 	if (u->nlimbs < v->nlimbs) {
 		/* Swap U and V. */
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux