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:45 +0000 (09:07 -0700)
commit47c47104b9908154a09565122f3dc6cf82182ee2
treec7176fc939b50c6e968354c69948c847eaf2039a
parent686cb03a4e6bf3aef1dd46bf29ebb20866dbbd12
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