android_kernel_motorola_sm6225/drivers/crypto/stm32
Thomas Bourgoin bcac425fa6 crypto: stm32 - fix loop iterating through scatterlist for DMA
commit d9c83f71eeceed2cb54bb78be84f2d4055fd9a1f 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-23 10:48:11 +02:00
..
Kconfig crypto: stm32 - Use standard CONFIG name 2017-12-28 17:56:50 +11:00
Makefile crypto: stm32 - Use standard CONFIG name 2017-12-28 17:56:50 +11:00
stm32-cryp.c crypto: stm32/cryp - fix double pm exit 2022-01-27 09:04:19 +01:00
stm32-hash.c crypto: stm32 - fix loop iterating through scatterlist for DMA 2023-09-23 10:48:11 +02:00
stm32_crc32.c crypto: stm32 - fix reference leak in stm32_crc_remove 2022-05-25 09:10:37 +02:00