android_kernel_motorola_sm6225/crypto
Herbert Xu 1fd247c1de crypto: drbg - Only fail when jent is unavailable in FIPS mode
[ Upstream commit 686cd976b6ddedeeb1a1fb09ba53a891d3cc9a03 ]

When jent initialisation fails for any reason other than ENOENT,
the entire drbg fails to initialise, even when we're not in FIPS
mode.  This is wrong because we can still use the kernel RNG when
we're not in FIPS mode.

Change it so that it only fails when we are in FIPS mode.

Fixes: 57225e6797 ("crypto: drbg - Use callback API for random readiness")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-17 11:13:13 +02:00
..
asymmetric_keys verify_pefile: relax wrapper length check 2023-04-20 12:04:40 +02:00
async_tx async_pq: Remove VLA usage 2018-06-18 20:17:38 +05:30
842.c
ablkcipher.c crypto: ablkcipher - fix crash flushing dcache in error path 2018-08-03 18:06:04 +08:00
acompress.c
aead.c crypto: aead - set CRYPTO_TFM_NEED_KEY if ->setkey() fails 2019-03-23 20:09:54 +01:00
aegis.h crypto: aegis/generic - fix for big endian systems 2018-11-13 11:08:46 -08:00
aegis128.c crypto: aegis - fix handling chunked inputs 2019-03-23 20:09:54 +01:00
aegis128l.c crypto: aegis - fix handling chunked inputs 2019-03-23 20:09:54 +01:00
aegis256.c crypto: aegis - fix handling chunked inputs 2019-03-23 20:09:54 +01:00
aes_generic.c
aes_ti.c crypto: aes_ti - disable interrupts while accessing S-box 2019-02-12 19:46:58 +01:00
af_alg.c crypto: af_alg - avoid undefined behavior accessing salg_name 2020-12-30 11:25:48 +01:00
ahash.c crypto: hash - set CRYPTO_TFM_NEED_KEY if ->setkey() fails 2019-03-23 20:09:54 +01:00
akcipher.c
algapi.c crypto: api - Fix race condition in crypto_spawn_alg 2020-02-11 04:34:05 -08:00
algboss.c crypto: algboss - don't wait during notifier callback 2020-06-25 15:33:09 +02:00
algif_aead.c crypto: algif_aead - Do not set MAY_BACKLOG on the async path 2020-10-29 09:54:59 +01:00
algif_hash.c crypto: af_alg - fix use-after-free in af_alg_accept() due to bh_lock_sock() 2020-07-09 09:37:10 +02:00
algif_rng.c
algif_skcipher.c crypto: algif_skcipher - EBUSY on aio should be an error 2020-10-29 09:55:01 +01:00
ansi_cprng.c
anubis.c
api.c crypto: api - check for ERR pointers in crypto_destroy_tfm() 2021-05-22 10:59:14 +02:00
arc4.c
authenc.c crypto: authenc - Fix sleep in atomic context in decrypt_tail 2022-04-15 14:14:42 +02:00
authencesn.c crypto: authencesn - Avoid twice completion call in decrypt path 2019-01-22 21:40:31 +01:00
blkcipher.c crypto: blkcipher - fix crash flushing dcache in error path 2018-08-03 18:06:04 +08:00
blowfish_common.c
blowfish_generic.c
camellia_generic.c
cast5_generic.c
cast6_generic.c
cast_common.c
cbc.c crypto: do not free algorithm before using 2018-12-13 09:16:21 +01:00
ccm.c crypto: ccm - fix incompatibility between "ccm" and "ccm_base" 2019-05-22 07:37:43 +02:00
cfb.c crypto: cfb - remove bogus memcpy() with src == dest 2019-03-23 20:09:40 +01:00
chacha20_generic.c crypto: chacha20 - Fix chacha20_block() keystream alignment (again) 2019-11-20 18:47:11 +01:00
chacha20poly1305.c crypto: chacha20poly1305 - fix atomic sleep when using async algorithm 2019-07-26 09:14:19 +02:00
cipher.c
cmac.c
compress.c
crc32_generic.c
crc32c_generic.c
crct10dif_common.c
crct10dif_generic.c crypto: crct10dif-generic - fix use via crypto_shash_digest() 2019-05-22 07:37:37 +02:00
cryptd.c crypto: cryptd - Fix skcipher instance memory leak 2019-07-10 09:53:41 +02:00
crypto_engine.c
crypto_null.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
crypto_user.c crypto: user - fix memory leak in crypto_report 2019-12-13 08:52:48 +01:00
crypto_wq.c
ctr.c
cts.c
deflate.c
des_generic.c
dh.c crypto: dh - fix memory leak 2018-07-20 13:51:21 +08:00
dh_helper.c crypto: dh - make crypto_dh_encode_key() make robust 2018-08-03 18:06:06 +08:00
drbg.c crypto: drbg - Only fail when jent is unavailable in FIPS mode 2023-05-17 11:13:13 +02:00
ecb.c
ecc.c crypto: ecdh - fix big endian bug in ECC library 2019-12-13 08:52:48 +01:00
ecc.h
ecc_curve_defs.h crypto: ecdh - fix typo of P-192 b value 2018-07-20 13:51:22 +08:00
ecdh.c crypto: ecdh - avoid buffer overflow in ecdh_set_secret() 2021-01-12 20:10:20 +01:00
ecdh_helper.c crypto: ecdh_helper - Ensure 'len >= secret.len' in decode_key() 2021-03-04 09:39:41 +01:00
echainiv.c
fcrypt.c
fips.c
gcm.c crypto: gcm - fix incompatibility between "gcm" and "gcm_base" 2019-05-22 07:37:37 +02:00
gf128mul.c
ghash-generic.c crypto: ghash - fix unaligned memory access in ghash_setkey() 2019-07-26 09:14:19 +02:00
hash_info.c
hmac.c
internal.h crypto: api - Fix race condition in crypto_spawn_alg 2020-02-11 04:34:05 -08:00
jitterentropy-kcapi.c
jitterentropy.c
Kconfig crypto: aes_ti - disable interrupts while accessing S-box 2019-02-12 19:46:58 +01:00
keywrap.c
khazad.c
kpp.c
lrw.c gcc-10: avoid shadowing standard library 'free()' in crypto 2020-05-20 08:18:46 +02:00
lz4.c
lz4hc.c
lzo.c
Makefile crypto: speck - remove Speck 2018-11-13 11:08:46 -08:00
mcryptd.c
md4.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
md5.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
memneq.c
michael_mic.c
morus640.c crypto: morus - fix handling chunked inputs 2019-03-23 20:09:54 +01:00
morus1280.c crypto: morus - fix handling chunked inputs 2019-03-23 20:09:54 +01:00
pcbc.c crypto: pcbc - remove bogus memcpy()s with src == dest 2019-03-23 20:09:55 +01:00
pcrypt.c crypto: pcrypt - Delay write to padata->info 2021-11-26 11:36:11 +01:00
poly1305_generic.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
proc.c
ripemd.h
rmd128.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
rmd160.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
rmd256.c crypto: rmd256 - use swap macro in rmd256_transform 2018-07-27 19:28:36 +08:00
rmd320.c crypto: rmd320 - use swap macro in rmd320_transform 2018-07-27 19:28:36 +08:00
rng.c
rsa-pkcs1pad.c crypto: rsa-pkcs1pad - Use akcipher_request_complete 2023-03-11 16:31:37 +01:00
rsa.c
rsa_helper.c
rsaprivkey.asn1
rsapubkey.asn1
salsa20_generic.c crypto: salsa20 - don't access already-freed walk.iv 2019-05-22 07:37:36 +02:00
scatterwalk.c crypto: scatterwalk - remove 'chain' argument from scatterwalk_crypto_chain() 2018-08-03 18:06:03 +08:00
scompress.c
seed.c
seqiv.c crypto: seqiv - Handle EBUSY correctly 2023-03-11 16:31:36 +01:00
serpent_generic.c crypto: serpent - mark __serpent_setkey_sbox noinline 2019-07-26 09:14:13 +02:00
sha1_generic.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sha3_generic.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux 2018-08-03 17:55:12 +08:00
sha256_generic.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sha512_generic.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
shash.c crypto: shash - avoid comparing pointers to exported functions under CFI 2021-07-20 16:15:44 +02:00
simd.c crypto: simd - correctly take reqsize of wrapped skcipher into account 2018-12-01 09:37:32 +01:00
skcipher.c crypto: skcipher - Unmap pages after an external error 2019-10-11 18:20:52 +02:00
sm3_generic.c crypto: sm3 - fix undefined shift by >= width of value 2019-01-22 21:40:31 +01:00
sm4_generic.c
tcrypt.c crypto: tcrypt - Fix multibuffer skcipher speed test mem leak 2023-01-18 11:30:22 +01:00
tcrypt.h
tea.c
testmgr.c crypto: testmgr - fix sizeof() on COMP_BUF_SIZE 2019-12-01 09:16:13 +01:00
testmgr.h crypto: x86/poly1305 - fix overflow during partial reduction 2019-04-27 09:36:37 +02:00
tgr192.c crypto: tgr192 - fix unaligned memory access 2020-01-27 14:50:13 +01:00
twofish_common.c
twofish_generic.c
vmac.c crypto: vmac - remove insecure version with hardcoded nonce 2018-07-01 21:00:44 +08:00
wp512.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
xcbc.c
xor.c
xts.c gcc-10: avoid shadowing standard library 'free()' in crypto 2020-05-20 08:18:46 +02:00
zstd.c