kernel-ark/crypto
Herbert Xu 9b2f4cb65f crypto: authenc - Fix crash with zero-length assoc data
The authenc code doesn't deal with zero-length associated data
correctly and ends up constructing a zero-length sg entry which
causes a crash when it's fed into the crypto system.

This patch fixes this by avoiding the code-path that triggers
the SG construction if we have no associated data.

This isn't the most optimal fix as it means that we'll end up
using the fallback code-path even when we could still execute
the digest function.  However, this isn't a big deal as nobody
but the test path would supply zero-length associated data.

Reported-by: Romain Francoise <romain@orebokech.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Romain Francoise <romain@orebokech.com>
2012-09-11 12:05:45 +08:00
..
async_tx
ablkcipher.c
aead.c
aes_generic.c
af_alg.c
ahash.c
algapi.c
algboss.c
algif_hash.c
algif_skcipher.c
ansi_cprng.c
anubis.c
api.c
arc4.c
authenc.c crypto: authenc - Fix crash with zero-length assoc data 2012-09-11 12:05:45 +08:00
authencesn.c
blkcipher.c
blowfish_common.c
blowfish_generic.c
camellia_generic.c
cast5.c
cast6.c
cbc.c
ccm.c
chainiv.c
cipher.c
compress.c
crc32c.c
cryptd.c
crypto_null.c
crypto_user.c
crypto_wq.c
ctr.c
cts.c
deflate.c
des_generic.c
ecb.c
eseqiv.c
fcrypt.c
fips.c
gcm.c
gf128mul.c
ghash-generic.c
hmac.c
internal.h
Kconfig
khazad.c
krng.c
lrw.c
lzo.c
Makefile
md4.c
md5.c
michael_mic.c
pcbc.c
pcompress.c
pcrypt.c
proc.c
ripemd.h
rmd128.c
rmd160.c
rmd256.c
rmd320.c
rng.c
salsa20_generic.c
scatterwalk.c
seed.c
seqiv.c
serpent_generic.c
sha1_generic.c
sha256_generic.c
sha512_generic.c
shash.c
tcrypt.c crypto: atmel - add new tests to tcrypt 2012-07-11 11:08:28 +08:00
tcrypt.h
tea.c
testmgr.c crypto: testmgr - add aead cbc aes hmac sha1,256,512 test vectors 2012-07-11 11:08:30 +08:00
testmgr.h crypto: testmgr - add aead cbc aes hmac sha1,256,512 test vectors 2012-07-11 11:08:30 +08:00
tgr192.c
twofish_common.c
twofish_generic.c
vmac.c
wp512.c
xcbc.c
xor.c
xts.c
zlib.c