From: Eric Biggers <ebiggers@kernel.org>
To: Dexuan Cui <decui@microsoft.com>
Cc: "linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: v5.12.0-rc5: the kernel panics if FIPS mode is on
Date: Mon, 29 Mar 2021 18:25:42 -0700 [thread overview]
Message-ID: <YGJ+FrwrSRyvMHoF@gmail.com> (raw)
In-Reply-To: <MW2PR2101MB0892C9A8BF670DEC3628CFAFBF7E9@MW2PR2101MB0892.namprd21.prod.outlook.com>
On Mon, Mar 29, 2021 at 09:56:18PM +0000, Dexuan Cui wrote:
> Hi all,
> The v5.12.0-rc5 kernel (1e43c377a79f) panics with fips=1.
>
> Please refer to the below panic call-trace. The kernel config file and
> the full kernel messages are also attached.
>
> Is this a known issue?
>
> Thanks,
> -- Dexuan
>
> Starting dracut pre-udev hook...
> [ 7.260424] alg: self-tests for sha512-generic (sha512) passed
> [ 7.265917] alg: self-tests for sha384-generic (sha384) passed
> [ 7.272426] alg: self-tests for sha512-ssse3 (sha512) passed
> [ 7.276500] alg: self-tests for sha384-ssse3 (sha384) passed
> [ 7.281722] alg: self-tests for sha512-avx (sha512) passed
> [ 7.286579] alg: self-tests for sha384-avx (sha384) passed
> [ 7.291631] alg: self-tests for sha512-avx2 (sha512) passed
> [ 7.296950] alg: self-tests for sha384-avx2 (sha384) passed
> [ 7.321040] alg: self-tests for sha3-224-generic (sha3-224) passed
> [ 7.330291] alg: self-tests for sha3-256-generic (sha3-256) passed
> [ 7.335918] alg: self-tests for sha3-384-generic (sha3-384) passed
> [ 7.341508] alg: self-tests for sha3-512-generic (sha3-512) passed
> [ 7.381918] alg: self-tests for crc32c-intel (crc32c) passed
> [ 7.396694] alg: self-tests for crct10dif-pclmul (crct10dif) passed
> [ 7.453515] alg: self-tests for ghash-clmulni (ghash) passed
> [ 7.469558] alg: self-tests for des3_ede-asm (des3_ede) passed
> [ 7.475355] alg: self-tests for ecb-des3_ede-asm (ecb(des3_ede)) passed
> [ 7.481361] alg: self-tests for cbc-des3_ede-asm (cbc(des3_ede)) passed
> [ 7.488656] alg: self-tests for des3_ede-generic (des3_ede) passed
> [ 7.304930] dracut-pre-udev[502]: modprobe: ERROR: could not insert 'padlock_aes': No such device
> [ 7.579580] alg: No test for fips(ansi_cprng) (fips_ansi_cprng)
> [ 7.606547] alg: self-tests for sha1 (sha1) passed
> [ 7.610624] alg: self-tests for ecb(des3_ede) (ecb(des3_ede)) passed
> [ 7.615746] alg: self-tests for cbc(des3_ede) (cbc(des3_ede)) passed
> [ 7.638067] alg: self-tests for ctr(des3_ede-asm) (ctr(des3_ede)) passed
> [ 7.644781] alg: self-tests for ctr(des3_ede) (ctr(des3_ede)) passed
> [ 7.653810] alg: self-tests for sha256 (sha256) passed
> [ 7.658945] alg: self-tests for ecb(aes) (ecb(aes)) passed
> [ 7.663493] alg: self-tests for cbc(aes) (cbc(aes)) passed
> [ 7.668421] alg: self-tests for xts(aes) (xts(aes)) passed
> [ 7.672389] alg: self-tests for ctr(aes) (ctr(aes)) passed
> [ 7.692973] alg: self-tests for rfc3686(ctr-aes-aesni) (rfc3686(ctr(aes))) passed
> [ 7.699446] alg: self-tests for rfc3686(ctr(aes)) (rfc3686(ctr(aes))) passed
> [ 7.730149] alg: skcipher: failed to allocate transform for ofb(aes): -2
> [ 7.735959] Kernel panic - not syncing: alg: self-tests for ofb(aes) (ofb(aes)) failed in fips mode!
> [ 7.736952] CPU: 13 PID: 560 Comm: modprobe Tainted: G W 5.12.0-rc5+ #3
> [ 7.736952] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090008 12/07/2018
> [ 7.736952] Call Trace:
> [ 7.736952] dump_stack+0x64/0x7c
> [ 7.736952] panic+0xfb/0x2d7
> [ 7.736952] alg_test+0x42d/0x460
> [ 7.736952] ? __kernfs_new_node+0x175/0x1d0
> [ 7.736952] do_test+0x3248/0x57ea [tcrypt]
> [ 7.736952] do_test+0x1f2c/0x57ea [tcrypt]
> [ 7.736952] ? 0xffffffffc031d000
> [ 7.736952] tcrypt_mod_init+0x55/0x1000 [tcrypt]
It looks like your userspace is using tcrypt.ko to request that the kernel test
"ofb(aes)", but your kernel doesn't have CONFIG_CRYPTO_OFB enabled so the test
fails as expected. Are you sure that anything changed on the kernel side
besides the kconfig you are using? It looks like this was always the behavior
when tcrypt.ko is used to test a non-existing algorithm.
Is your userspace code intentionally trying to test "ofb(aes)", or is it
accidental?
- Eric
next prev parent reply other threads:[~2021-03-30 1:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-29 21:56 v5.12.0-rc5: the kernel panics if FIPS mode is on Dexuan Cui
2021-03-30 1:25 ` Eric Biggers [this message]
2021-03-30 6:56 ` Dexuan Cui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YGJ+FrwrSRyvMHoF@gmail.com \
--to=ebiggers@kernel.org \
--cc=decui@microsoft.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox