]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: qce - Fix SHA result buffer corruption issues
authorThara Gopinath <thara.gopinath@linaro.org>
Thu, 19 Nov 2020 15:52:31 +0000 (10:52 -0500)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 27 Nov 2020 06:13:40 +0000 (17:13 +1100)
commit4d5d7d6b4340dc33ec6610fd4a0349ef32fb92d4
treef5584f4c249dc0bd1558942cea112b78961f9e69
parent562f3ee54337529cd424ff244c9fdce9a084f9b7
crypto: qce - Fix SHA result buffer corruption issues

Partial hash was being copied into the final result buffer without the
entire message block processed. Depending on how the end user processes
this result buffer, errors vary from result buffer corruption to result
buffer poisoing. Fix this issue by ensuring that only the final hash value
is copied into the result buffer.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qce/sha.c