crypto: caam - fix memory corruption in ahash_final_ctx
authorHoria Geant? <horia.geanta@freescale.com>
Tue, 11 Aug 2015 17:19:20 +0000 (20:19 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 13 Aug 2015 07:08:25 +0000 (15:08 +0800)
commitb310c178e6d897f82abb9da3af1cd7c02b09f592
tree225eeba9d20daed08880f7d6e64859826e6497c5
parentd3392f41f6d3cd0a034bd0aca47fabea2b47218e
crypto: caam - fix memory corruption in ahash_final_ctx

When doing pointer operation for accessing the HW S/G table,
a value representing number of entries (and not number of bytes)
must be used.

Cc: <stable@vger.kernel.org> # 3.6+
Fixes: 045e36780f115 ("crypto: caam - ahash hmac support")
Signed-off-by: Horia Geant? <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamhash.c