linux/crypto
Herbert Xu b61907bb42 crypto: shash - Fix zero-length shash ahash digest crash
The shash ahash digest adaptor function may crash if given a
zero-length input together with a null SG list.  This is because
it tries to read the SG list before looking at the length.

This patch fixes it by checking the length first.

Cc: <stable@vger.kernel.org>
Reported-by: Stephan Müller<smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Stephan Müller <smueller@chronox.de>
2017-10-11 00:34:07 +08:00
..
asymmetric_keys
async_tx
.gitignore
842.c
ablk_helper.c
ablkcipher.c
acompress.c
aead.c
aes_generic.c
aes_ti.c
af_alg.c crypto: af_alg - update correct dst SGL entry 2017-09-20 17:42:42 +08:00
ahash.c crypto: hash - add crypto_(un)register_ahashes() 2017-08-22 14:54:52 +08:00
akcipher.c
algapi.c crypto: algapi - use separate dst and src operands for __crypto_xor() 2017-08-04 09:27:05 +08:00
algboss.c
algif_aead.c crypto: algif_aead - fix comment regarding memory layout 2017-08-22 14:54:50 +08:00
algif_hash.c
algif_rng.c
algif_skcipher.c crypto: algif_skcipher - only call put_page on referenced and used pages 2017-08-22 14:45:48 +08:00
ansi_cprng.c
anubis.c
api.c
arc4.c
authenc.c
authencesn.c
blkcipher.c
blowfish_common.c
blowfish_generic.c
camellia_generic.c
cast5_generic.c
cast6_generic.c
cast_common.c
cbc.c
ccm.c
chacha20_generic.c crypto: chacha20 - fix handling of chunked input 2017-08-22 14:45:47 +08:00
chacha20poly1305.c
cipher.c
cmac.c
compress.c
crc32_generic.c
crc32c_generic.c
crct10dif_common.c
crct10dif_generic.c
cryptd.c
crypto_engine.c
crypto_null.c
crypto_user.c
crypto_wq.c
ctr.c crypto: algapi - make crypto_xor() take separate dst and src arguments 2017-08-04 09:27:15 +08:00
cts.c
deflate.c
des_generic.c
dh.c
dh_helper.c
drbg.c crypto: drbg - fix freeing of resources 2017-09-20 17:42:29 +08:00
ecb.c
ecc.c
ecc.h
ecc_curve_defs.h
ecdh.c crypto: ecdh - fix concurrency on shared secret and pubkey 2017-08-03 13:47:22 +08:00
ecdh_helper.c
echainiv.c
fcrypt.c
fips.c
gcm.c
gf128mul.c
ghash-generic.c
hash_info.c
hmac.c
internal.h
jitterentropy-kcapi.c
jitterentropy.c
Kconfig crypto: algif_aead - copy AAD from src to dst 2017-08-09 20:17:52 +08:00
keywrap.c
khazad.c
kpp.c
lrw.c
lz4.c
lz4hc.c
lzo.c
Makefile
mcryptd.c
md4.c
md5.c
memneq.c
michael_mic.c
pcbc.c crypto: algapi - make crypto_xor() take separate dst and src arguments 2017-08-04 09:27:15 +08:00
pcrypt.c
poly1305_generic.c
proc.c
ripemd.h
rmd128.c
rmd160.c
rmd256.c
rmd320.c
rng.c
rsa-pkcs1pad.c
rsa.c
rsa_helper.c
rsaprivkey.asn1
rsapubkey.asn1
salsa20_generic.c
scatterwalk.c
scompress.c crypto: scompress - defer allocation of scratch buffer to first use 2017-08-03 13:52:44 +08:00
seed.c
seqiv.c
serpent_generic.c crypto: serpent - improve __serpent_setkey with UBSAN 2017-08-09 20:17:54 +08:00
sha1_generic.c
sha3_generic.c
sha256_generic.c
sha512_generic.c
shash.c crypto: shash - Fix zero-length shash ahash digest crash 2017-10-11 00:34:07 +08:00
simd.c
skcipher.c crypto: skcipher - Fix crash on zero-length input 2017-10-07 12:04:32 +08:00
tcrypt.c
tcrypt.h
tea.c
testmgr.c
testmgr.h crypto: testmgr - add chunked test cases for chacha20 2017-08-22 14:45:48 +08:00
tgr192.c
twofish_common.c
twofish_generic.c
vmac.c
wp512.c
xcbc.c
xor.c
xts.c crypto: xts - Fix an error handling path in 'create()' 2017-10-07 12:04:31 +08:00