crypto: mxs-dcp - fix scatterlist linearization for hash
authorRosioru Dragos <dragos.rosioru@nxp.com>
Tue, 25 Feb 2020 15:05:52 +0000 (17:05 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 6 Mar 2020 01:28:21 +0000 (12:28 +1100)
commitfa03481b6e2e82355c46644147b614f18c7a8161
treec0446b88eae61a4639fd3d7d24fdc48021113375
parent5fbab10dee12ce215f615a08e07b51e91f25f2ab
crypto: mxs-dcp - fix scatterlist linearization for hash

The incorrect traversal of the scatterlist, during the linearization phase
lead to computing the hash value of the wrong input buffer.
New implementation uses scatterwalk_map_and_copy()
to address this issue.

Cc: <stable@vger.kernel.org>
Fixes: 15b59e7c3733 ("crypto: mxs - Add Freescale MXS DCP driver")
Signed-off-by: Rosioru Dragos <dragos.rosioru@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/mxs-dcp.c