crypto: gcm - fix assumption that assoc has one segment
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Thu, 28 Mar 2013 19:54:03 +0000 (21:54 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 2 Apr 2013 09:56:15 +0000 (17:56 +0800)
commitd3dde52209ab571e4e2ec26c66f85ad1355f7475
treeca1f749ba9eb9fb5e164c61d5b9ccb60a9a78aaf
parent246bbedb9aaf27e2207501d93a869023a439fce5
crypto: gcm - fix assumption that assoc has one segment

rfc4543(gcm(*)) code for GMAC assumes that assoc scatterlist always contains
only one segment and only makes use of this first segment. However ipsec passes
assoc with three segments when using 'extended sequence number' thus in this
case rfc4543(gcm(*)) fails to function correctly. Patch fixes this issue.

Reported-by: Chaoxing Lin <Chaoxing.Lin@ultra-3eti.com>
Tested-by: Chaoxing Lin <Chaoxing.Lin@ultra-3eti.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/gcm.c