linux/crypto
Joy Latten 1edcf2e1ee [CRYPTO] xcbc: Fix crash when ipsec uses xcbc-mac with big data chunk
The kernel crashes when ipsec passes a udp packet of about 14XX bytes
of data to aes-xcbc-mac.

It seems the first xxxx bytes of the data are in first sg entry,
and remaining xx bytes are in next sg entry. But we don't 
check next sg entry to see if we need to go look the page up.

I noticed in hmac.c, we do a scatterwalk_sg_next(), to do this check
and possible lookup, thus xcbc.c needs to use this routine too.

A 15-hour run of an ipsec stress test sending streams of tcp and
udp packets of various sizes,  using this patch and 
aes-xcbc-mac completed successfully, so hopefully this fixes the
problem.
 
Signed-off-by: Joy Latten <latten@austin.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-04-02 14:36:09 +08:00
..
async_tx async_tx: avoid the async xor_zero_sum path when src_cnt > device->max_xor 2008-03-18 17:01:00 -07:00
ablkcipher.c [CRYPTO] skcipher: Move chainiv/seqiv into crypto_blkcipher module 2008-02-23 11:12:06 +08:00
aead.c [CRYPTO] api: Show async type 2008-01-11 08:16:56 +11:00
aes_generic.c [CRYPTO] aes-generic: Make key generation exportable 2008-01-11 08:16:09 +11:00
algapi.c [CRYPTO] api: Add crypto_attr_alg_name 2008-01-11 08:16:40 +11:00
anubis.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
api.c [CRYPTO] skcipher: Create default givcipher instances 2008-01-11 08:16:46 +11:00
arc4.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
authenc.c [CRYPTO] authenc: Add givencrypt operation 2008-01-11 08:16:50 +11:00
blkcipher.c [CRYPTO] skcipher: Move chainiv/seqiv into crypto_blkcipher module 2008-02-23 11:12:06 +08:00
blowfish.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
camellia.c [CRYPTO] camellia: Move more common code into camellia_setup_tail 2008-01-11 08:16:22 +11:00
cast5.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
cast6.c [CRYPTO] cast6: inline bloat-- 2008-01-11 08:17:02 +11:00
cbc.c Convert ERR_PTR(PTR_ERR(p)) instances to ERR_CAST(p) 2008-02-07 08:42:26 -08:00
ccm.c [CRYPTO] ccm: Added CCM mode 2008-01-11 08:16:53 +11:00
chainiv.c [CRYPTO] skcipher: Fix section mismatches 2008-03-08 20:29:43 +08:00
cipher.c [CRYPTO] api: Add missing headers for setkey_unaligned 2007-10-10 16:55:40 -07:00
compress.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
crc32c.c [CRYPTO] api: Get rid of flags argument to setkey 2006-09-21 11:41:02 +10:00
cryptd.c Convert ERR_PTR(PTR_ERR(p)) instances to ERR_CAST(p) 2008-02-07 08:42:26 -08:00
crypto_null.c [CRYPTO] null: Allow setkey on digest_null 2008-01-11 08:16:54 +11:00
cryptomgr.c [CRYPTO] cryptomgr: Fix parsing of recursive algorithms 2007-10-10 16:55:45 -07:00
ctr.c [CRYPTO] seqiv: Add Sequence Number IV Generator 2008-01-11 08:16:48 +11:00
deflate.c [CRYPTO] api: Added cra_init/cra_exit 2006-06-26 17:34:40 +10:00
des_generic.c [CRYPTO] hifn_795x: Detect weak keys 2008-01-11 08:16:03 +11:00
digest.c [CRYPTO] digest: Include internal.h for prototypes 2008-03-05 19:05:54 +08:00
ecb.c Convert ERR_PTR(PTR_ERR(p)) instances to ERR_CAST(p) 2008-02-07 08:42:26 -08:00
eseqiv.c [CRYPTO] skcipher: Fix section mismatches 2008-03-08 20:29:43 +08:00
fcrypt.c fcrypt endianness misannotations 2007-12-05 09:25:20 -08:00
gcm.c [CRYPTO] gcm: Introduce rfc4106 2008-01-11 08:16:56 +11:00
gf128mul.c [CRYPTO] xts: XTS blockcipher mode implementation without partial blocks 2007-10-10 16:55:45 -07:00
hash.c [CRYPTO] api: Add missing headers for setkey_unaligned 2007-10-10 16:55:40 -07:00
hmac.c Convert ERR_PTR(PTR_ERR(p)) instances to ERR_CAST(p) 2008-02-07 08:42:26 -08:00
internal.h [CRYPTO] skcipher: Create default givcipher instances 2008-01-11 08:16:46 +11:00
Kconfig [CRYPTO] authenc: Add missing Kconfig dependency on BLKCIPHER 2008-02-23 11:13:00 +08:00
khazad.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
lrw.c Convert ERR_PTR(PTR_ERR(p)) instances to ERR_CAST(p) 2008-02-07 08:42:26 -08:00
lzo.c [CRYPTO] lzo: Add LZO compression algorithm support 2008-01-11 08:16:35 +11:00
Makefile [CRYPTO] skcipher: Move chainiv/seqiv into crypto_blkcipher module 2008-02-23 11:12:06 +08:00
md4.c [CRYPTO] all: Pass tfm instead of ctx to algorithms 2006-06-26 17:34:39 +10:00
md5.c [CRYPTO] all: Pass tfm instead of ctx to algorithms 2006-06-26 17:34:39 +10:00
michael_mic.c [PATCH] Update my email address from jkmaline@cc.hut.fi to j@w1.fi 2007-04-28 11:01:01 -04:00
pcbc.c Convert ERR_PTR(PTR_ERR(p)) instances to ERR_CAST(p) 2008-02-07 08:42:26 -08:00
proc.c Make crypto API use seq_list_xxx helpers 2007-07-16 09:05:42 -07:00
salsa20_generic.c [CRYPTO] salsa20_generic: Fix multi-page processing 2008-01-11 08:16:34 +11:00
scatterwalk.c [CRYPTO] scatterwalk: Handle zero nbytes in scatterwalk_map_and_copy 2008-01-11 08:16:54 +11:00
seed.c [CRYPTO] seed: New cipher algorithm 2007-10-10 16:55:38 -07:00
seqiv.c [CRYPTO] seqiv: Add AEAD support 2008-01-11 08:16:52 +11:00
serpent.c [PATCH] serpent: fix endian warnings 2006-10-10 16:15:33 -07:00
sha1_generic.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
sha256_generic.c [CRYPTO] sha256-generic: Extend sha256_generic.c to support SHA-224 2008-01-11 08:16:12 +11:00
sha512.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
tcrypt.c [CRYPTO] tcrypt: Make xcbc available as a standalone test 2008-01-11 08:17:01 +11:00
tcrypt.h [CRYPTO] tcrypt: Add CCM vectors 2008-01-11 08:16:53 +11:00
tea.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
tgr192.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
twofish_common.c [CRYPTO] twofish: Do not unroll big stuff in twofish key setup 2008-01-11 08:16:06 +11:00
twofish.c [CRYPTO] twofish: Fix the priority 2006-09-21 11:16:28 +10:00
wp512.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
xcbc.c [CRYPTO] xcbc: Fix crash when ipsec uses xcbc-mac with big data chunk 2008-04-02 14:36:09 +08:00
xor.c async_tx: add the async_tx api 2007-07-13 08:06:14 -07:00
xts.c [CRYPTO] xts: Use proper alignment 2008-03-06 18:56:19 +08:00