diff options
author | Joy Latten <latten@austin.ibm.com> | 2008-03-12 12:17:45 +0800 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2008-03-24 11:47:12 -0700 |
commit | 0c7ac6f8e603b7e33c7ee268c30f2de59111951c (patch) | |
tree | 6f778315df85f98135e4d53dcbc25a8098d8a559 /drivers/usb/storage/protocol.c | |
parent | 0ad5232c1ccba61437676cdb88d030b1c369dec7 (diff) |
CRYPTO xcbc: Fix crash with IPsec
[ Upstream commit: 2f40a178e70030c4712fe63807c883f34c3645eb ]
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>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/storage/protocol.c')
0 files changed, 0 insertions, 0 deletions