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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 16:07:59 +0000 (09:07 -0700)
commitd51689e20adbf8fe2c3999939da8d61ed2ccbc58
tree283921ca78ba3c7433904fae082e60b58da64aa6
parent0a1b726993ae45ffda33dde0a5760926f682faf8
crypto: caam - fix memory corruption in ahash_final_ctx

commit b310c178e6d897f82abb9da3af1cd7c02b09f592 upstream.

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.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/caam/caamhash.c