Joy Latten 2f40a178e7 [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>
2008-03-06 19:28:44 +08:00
..
2008-01-11 08:16:56 +11:00
2007-11-02 08:47:06 +01:00
2007-11-02 08:47:06 +01:00
2008-01-11 08:17:02 +11:00
2008-01-11 08:16:53 +11:00
2007-11-02 08:47:06 +01:00
2007-12-05 09:25:20 -08:00
2008-01-11 08:16:56 +11:00
2007-11-02 08:47:06 +01:00
2007-10-10 16:55:38 -07:00
2008-01-11 08:16:52 +11:00
2006-10-10 16:15:33 -07:00
2007-11-02 08:47:06 +01:00
2008-01-11 08:16:53 +11:00
2007-11-02 08:47:06 +01:00
2007-11-02 08:47:06 +01:00
2006-09-21 11:16:28 +10:00
2007-11-02 08:47:06 +01:00
2008-03-06 19:28:44 +08:00
2007-07-13 08:06:14 -07:00
2008-03-06 18:56:19 +08:00