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: <20211105072608.GA13584@gondor.apana.org.au>
Date:   Fri, 5 Nov 2021 15:26:08 +0800
From:   Herbert Xu <herbert@...dor.apana.org.au>
To:     Ido Schimmel <idosch@...sch.org>
Cc:     Geert Uytterhoeven <geert@...ux-m68k.org>,
        Damien Le Moal <Damien.LeMoal@....com>,
        Nathan Chancellor <nathan@...nel.org>,
        Linux Crypto Mailing List <linux-crypto@...r.kernel.org>,
        Vladis Dronov <vdronov@...hat.com>,
        Simo Sorce <ssorce@...hat.com>,
        Eric Biggers <ebiggers@...nel.org>,
        "llvm@...ts.linux.dev" <llvm@...ts.linux.dev>,
        kernel test robot <lkp@...el.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Guenter Roeck <linux@...ck-us.net>
Subject: crypto: api - Fix boot-up crash when crypto manager is disabled

On Thu, Nov 04, 2021 at 05:18:34PM +0200, Ido Schimmel wrote:
>
> Attached my config. I can easily test patches.

Thanks!

Could you all try this patch please?

---8<---
When the crypto manager is disabled, we need to explicitly set
the crypto algorithms' tested status so that they can be used.

Fixes: cad439fc040e ("crypto: api - Do not create test larvals if...")
Reported-by: Geert Uytterhoeven <geert@...ux-m68k.org>
Reported-by: Ido Schimmel <idosch@...sch.org>
Reported-by: Guenter Roeck <linux@...ck-us.net>
Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>

diff --git a/crypto/algapi.c b/crypto/algapi.c
index d379fd91fb7b..a366cb3e8aa1 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -284,6 +284,8 @@ static struct crypto_larval *__crypto_register_alg(struct crypto_alg *alg)
 
 	if (larval)
 		list_add(&larval->alg.cra_list, &crypto_alg_list);
+	else
+		alg->cra_flags |= CRYPTO_ALG_TESTED;
 
 	crypto_stats_init(alg);
 
-- 
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