linux-stable/crypto
Eric Biggers d45a90cb5d crypto: sm3 - fix undefined shift by >= width of value
sm3_compress() calls rol32() with shift >= 32, which causes undefined
behavior.  This is easily detected by enabling CONFIG_UBSAN.

Explicitly AND with 31 to make the behavior well defined.

Fixes: 4f0fc1600e ("crypto: sm3 - add OSCCA SM3 secure hash")
Cc: <stable@vger.kernel.org> # v4.15+
Cc: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-01-10 21:37:32 +08:00
..
asymmetric_keys KEYS: asym_tpm: Add support for the sign operation [ver #2] 2018-10-26 09:30:47 +01:00
async_tx
842.c
ablkcipher.c crypto: skcipher - remove remnants of internal IV generators 2018-12-23 11:52:45 +08:00
acompress.c crypto: user - clean up report structure copying 2018-11-09 17:41:39 +08:00
adiantum.c crypto: adiantum - initialize crypto_spawn::inst 2019-01-10 21:37:31 +08:00
aead.c crypto: user - clean up report structure copying 2018-11-09 17:41:39 +08:00
aegis.h
aegis128.c
aegis128l.c
aegis256.c
aes_generic.c crypto: arm/aes - add some hardening against cache-timing attacks 2018-11-09 17:36:48 +08:00
aes_ti.c crypto: aes_ti - disable interrupts while accessing S-box 2018-11-09 17:36:48 +08:00
af_alg.c
ahash.c crypto: user - fix use_after_free of struct xxx_request 2018-12-07 14:15:00 +08:00
akcipher.c crypto: user - clean up report structure copying 2018-11-09 17:41:39 +08:00
algapi.c crypto: user - Add crypto_stats_init 2018-12-07 14:15:00 +08:00
algboss.c
algif_aead.c
algif_hash.c
algif_rng.c
algif_skcipher.c
ansi_cprng.c
anubis.c
api.c
arc4.c
authenc.c crypto: authenc - fix parsing key with misaligned rta_len 2019-01-10 21:37:31 +08:00
authencesn.c crypto: authencesn - Avoid twice completion call in decrypt path 2019-01-10 21:37:31 +08:00
blkcipher.c crypto: skcipher - remove remnants of internal IV generators 2018-12-23 11:52:45 +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-11-29 14:53:59 +08:00
ccm.c
cfb.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-12-07 13:59:10 +08:00
chacha20poly1305.c crypto: chacha20-generic - refactor to allow varying number of rounds 2018-11-20 14:26:55 +08:00
chacha_generic.c crypto: chacha - add XChaCha12 support 2018-11-20 14:26:55 +08:00
cipher.c
cmac.c
compress.c
crc32_generic.c
crc32c_generic.c
crct10dif_common.c
crct10dif_generic.c
cryptd.c crypto: skcipher - remove remnants of internal IV generators 2018-12-23 11:52:45 +08:00
crypto_engine.c
crypto_null.c
crypto_user_base.c crypto: user - remove unused dump functions 2018-12-23 11:52:44 +08:00
crypto_user_stat.c crypto: user - remove unused dump functions 2018-12-23 11:52:44 +08:00
crypto_wq.c
ctr.c crypto: skcipher - remove remnants of internal IV generators 2018-12-23 11:52:45 +08:00
cts.c
deflate.c
des_generic.c
dh.c
dh_helper.c
drbg.c
ecb.c
ecc.c crypto: ecc - regularize scalar for scalar multiplication 2018-11-16 14:11:04 +08:00
ecc.h
ecc_curve_defs.h
ecdh.c
ecdh_helper.c
echainiv.c
fcrypt.c
fips.c
gcm.c
gf128mul.c
ghash-generic.c
hash_info.c crypto: streebog - register Streebog in hash info for IMA 2018-11-16 14:09:40 +08:00
hmac.c
internal.h
jitterentropy-kcapi.c
jitterentropy.c
Kconfig Kconfig updates for v4.21 2018-12-29 13:03:29 -08:00
keywrap.c
khazad.c
kpp.c crypto: user - clean up report structure copying 2018-11-09 17:41:39 +08:00
lrw.c
lz4.c crypto: remove useless initializations of cra_list 2018-11-20 14:26:55 +08:00
lz4hc.c crypto: remove useless initializations of cra_list 2018-11-20 14:26:55 +08:00
lzo.c
Makefile crypto: user - made crypto_user_stat optional 2018-12-07 14:15:00 +08:00
md4.c
md5.c
memneq.c
michael_mic.c
morus640.c
morus1280.c
nhpoly1305.c crypto: adiantum - adjust some comments to match latest paper 2018-12-13 18:24:59 +08:00
ofb.c
pcbc.c crypto: do not free algorithm before using 2018-11-29 14:53:59 +08:00
pcrypt.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-12-27 13:53:32 -08:00
poly1305_generic.c crypto: poly1305 - add Poly1305 core API 2018-11-20 14:26:56 +08:00
proc.c
ripemd.h
rmd128.c
rmd160.c
rmd256.c
rmd320.c
rng.c crypto: user - fix use_after_free of struct xxx_request 2018-12-07 14:15:00 +08:00
rsa-pkcs1pad.c crypto: rsa-pkcs1pad: Allow hash to be optional [ver #2] 2018-10-26 09:30:46 +01:00
rsa.c
rsa_helper.c
rsaprivkey.asn1
rsapubkey.asn1
salsa20_generic.c crypto: salsa20-generic - don't unnecessarily use atomic walk 2018-12-23 11:52:44 +08:00
scatterwalk.c
scompress.c crypto: user - clean up report structure copying 2018-11-09 17:41:39 +08:00
seed.c
seqiv.c
serpent_generic.c
sha1_generic.c
sha3_generic.c
sha256_generic.c
sha512_generic.c
shash.c crypto: user - clean up report structure copying 2018-11-09 17:41:39 +08:00
simd.c crypto: simd - correctly take reqsize of wrapped skcipher into account 2018-11-09 17:35:43 +08:00
skcipher.c crypto: skcipher - remove remnants of internal IV generators 2018-12-23 11:52:45 +08:00
sm3_generic.c crypto: sm3 - fix undefined shift by >= width of value 2019-01-10 21:37:32 +08:00
sm4_generic.c
streebog_generic.c crypto: streebog - add Streebog hash function 2018-11-16 14:09:40 +08:00
tcrypt.c crypto: tcrypt - add block size of 1472 to skcipher template 2018-12-13 18:24:40 +08:00
tcrypt.h
tea.c
testmgr.c crypto: adiantum - add Adiantum support 2018-11-20 14:26:56 +08:00
testmgr.h crypto: xchacha20 - fix comments for test vectors 2018-12-13 18:24:59 +08:00
tgr192.c
twofish_common.c
twofish_generic.c
vmac.c
wp512.c
xcbc.c
xor.c
xts.c
zstd.c