summaryrefslogtreecommitdiff
path: root/crypto/eseqiv.c
diff options
context:
space:
mode:
authorJoy Latten <latten@austin.ibm.com>2008-03-06 19:28:44 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2008-03-06 19:28:44 +0800
commit12da6951c110e8fd80cb25dfdeb96f57513bcaf2 (patch)
tree85e21a089f7da613de8fb1ece77767fb7952986b /crypto/eseqiv.c
parentcba4255808b2a8a6e27e595ca5717df09a9927c9 (diff)
downloadlinux-crypto-12da6951c110e8fd80cb25dfdeb96f57513bcaf2.tar.gz
linux-crypto-12da6951c110e8fd80cb25dfdeb96f57513bcaf2.zip
[CRYPTO] xcbc: Fix crash with IPsec
When using aes-xcbc-mac for authentication in IPsec, the kernel crashes. It seems this algorithm doesn't account for the space IPsec may make in scatterlist for authtag. Thus when crypto_xcbc_digest_update2() gets called, nbytes may be less than sg[i].length. Since nbytes is an unsigned number, it wraps at the end of the loop allowing us to go back into loop and causing crash in memcpy. I used update function in digest.c to model this fix. Please let me know if it looks ok. Signed-off-by: Joy Latten <latten@austin.ibm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/eseqiv.c')
0 files changed, 0 insertions, 0 deletions