diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-12-04 08:53:09 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-12-04 08:53:09 -0800 |
commit | d644c026e6b21959af1f86b15206ae26c64c2e51 (patch) | |
tree | eadcb52fcdc2bdbf4b7cfe3dd69053f5727c3bc0 /crypto/authenc.c | |
parent | 1ab231b274ba51a54acebec23c6aded0f3cdf54e (diff) | |
parent | 8ec25c51291681bd68bdc290b35f2e61fa601c21 (diff) | |
download | op-kernel-dev-d644c026e6b21959af1f86b15206ae26c64c2e51.zip op-kernel-dev-d644c026e6b21959af1f86b15206ae26c64c2e51.tar.gz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu:
"This push fixes a number of crashes triggered by a previous crypto
self-test update. It also fixes a build problem in the caam driver,
as well as a concurrency issue in s390.
Finally there is a pair of fixes to bugs in the crypto scatterwalk
code and authenc that may lead to crashes"
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: testmgr - fix sglen in test_aead for case 'dst != src'
crypto: talitos - fix aead sglen for case 'dst != src'
crypto: caam - fix aead sglen for case 'dst != src'
crypto: ccm - Fix handling of zero plaintext when computing mac
crypto: s390 - Fix aes-xts parameter corruption
crypto: talitos - corrrectly handle zero-length assoc data
crypto: scatterwalk - Set the chain pointer indication bit
crypto: authenc - Find proper IV address in ablkcipher callback
crypto: caam - Add missing Job Ring include
Diffstat (limited to 'crypto/authenc.c')
-rw-r--r-- | crypto/authenc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/authenc.c b/crypto/authenc.c index 1875e70..e122355 100644 --- a/crypto/authenc.c +++ b/crypto/authenc.c @@ -380,9 +380,10 @@ static void crypto_authenc_encrypt_done(struct crypto_async_request *req, if (!err) { struct crypto_aead *authenc = crypto_aead_reqtfm(areq); struct crypto_authenc_ctx *ctx = crypto_aead_ctx(authenc); - struct ablkcipher_request *abreq = aead_request_ctx(areq); - u8 *iv = (u8 *)(abreq + 1) + - crypto_ablkcipher_reqsize(ctx->enc); + struct authenc_request_ctx *areq_ctx = aead_request_ctx(areq); + struct ablkcipher_request *abreq = (void *)(areq_ctx->tail + + ctx->reqoff); + u8 *iv = (u8 *)abreq - crypto_ablkcipher_ivsize(ctx->enc); err = crypto_authenc_genicv(areq, iv, 0); } |