android_kernel_asus_sm8350/drivers/crypto/stm32
Thomas Bourgoin 5e7d0acc69 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:59:56 +02:00
..
Kconfig crypto: des - split off DES library from generic DES cipher driver 2019-08-22 14:57:33 +10:00
Makefile Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-07-08 20:57:08 -07:00
stm32-crc32.c crypto: stm32 - fix reference leak in stm32_crc_remove 2022-05-25 09:14:32 +02:00
stm32-cryp.c crypto: stm32/cryp - fix lrw chaining mode 2022-01-27 09:19:33 +01:00
stm32-hash.c crypto: stm32 - fix loop iterating through scatterlist for DMA 2023-09-23 10:59:56 +02:00