]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Apr 2020 05:58:56 +0000 (07:58 +0200)
commite367644b464ab83f6ce5955458bd81299a77252f
treed5a330792f6ac722fa13581b469bf499de4c32d4
parentc7b7daf956babcde75c4fddd99244d20f25ddedc
crypto: mxs-dcp - fix scatterlist linearization for hash

commit fa03481b6e2e82355c46644147b614f18c7a8161 upstream.

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