linux-stable/drivers/crypto/stm32
Thomas Bourgoin cb65ad51f1 crypto: stm32 - fix loop iterating through scatterlist for DMA
commit d9c83f71ee upstream.

We were reading the length of the scatterlist sg after copying value of
tsg inside.
So we are using the size of the previous scatterlist and for the first
one we are using an unitialised value.
Fix this by copying tsg in sg[0] before reading the size.

Fixes : 8a1012d3f2 ("crypto: stm32 - Support for STM32 HASH module")
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Bourgoin <thomas.bourgoin@foss.st.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-19 12:22:52 +02:00
..
Kconfig crypto: stm32/crc32 - Avoid lock if hardware is already used 2020-09-25 17:48:14 +10:00
Makefile
stm32-crc32.c crypto: stm32 - fix reference leak in stm32_crc_remove 2022-05-25 09:57:24 +02:00
stm32-cryp.c crypto: stm32 - Revert broken pm_runtime_resume_and_get changes 2022-01-27 11:03:35 +01:00
stm32-hash.c crypto: stm32 - fix loop iterating through scatterlist for DMA 2023-09-19 12:22:52 +02:00