linux-stable/arch/s390/crypto
Herbert Xu d68ac38895 crypto: s390/aes - Fix buffer overread in CTR mode
commit d07f951903 upstream.

When processing the last block, the s390 ctr code will always read
a whole block, even if there isn't a whole block of data left.  Fix
this by using the actual length left and copy it into a buffer first
for processing.

Fixes: 0200f3ecc1 ("crypto: s390 - add System z hardware support for CTR mode")
Cc: <stable@vger.kernel.org>
Reported-by: Guangwu Zhang <guazhang@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Reviewd-by: Harald Freudenberger <freude@de.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-31 16:18:50 -08:00
..
aes_s390.c crypto: s390/aes - Fix buffer overread in CTR mode 2024-01-31 16:18:50 -08:00
arch_random.c s390/archrandom: add missing header include 2023-01-10 14:39:08 +01:00
chacha-glue.c s390/crypto: use vector instructions only if available for ChaCha20 2023-05-15 14:20:13 +02:00
chacha-s390.h
chacha-s390.S s390/crypto,chacha: use SYM* macros instead of ENTRY(), etc. 2023-04-19 17:24:17 +02:00
crc32-vx.c s390/cpufeature: rework to allow more than only hwcap bits 2022-07-19 16:18:49 +02:00
crc32be-vx.S s390: fix various typos 2023-07-03 11:19:42 +02:00
crc32le-vx.S s390/crc32le: use SYM* macros instead of ENTRY(), etc. 2023-04-19 17:24:17 +02:00
des_s390.c s390/cpufeature: rework to allow more than only hwcap bits 2022-07-19 16:18:49 +02:00
ghash_s390.c s390/cpufeature: rework to allow more than only hwcap bits 2022-07-19 16:18:49 +02:00
Kconfig crypto: Kconfig - simplify cipher entries 2022-08-26 18:50:43 +08:00
Makefile random: remove CONFIG_ARCH_RANDOM 2022-07-18 15:03:37 +02:00
paes_s390.c crypto: s390/aes - Fix buffer overread in CTR mode 2024-01-31 16:18:50 -08:00
prng.c s390/cpufeature: rework to allow more than only hwcap bits 2022-07-19 16:18:49 +02:00
sha.h
sha1_s390.c s390/cpufeature: rework to allow more than only hwcap bits 2022-07-19 16:18:49 +02:00
sha3_256_s390.c s390/cpufeature: rework to allow more than only hwcap bits 2022-07-19 16:18:49 +02:00
sha3_512_s390.c s390/cpufeature: rework to allow more than only hwcap bits 2022-07-19 16:18:49 +02:00
sha256_s390.c s390/cpufeature: rework to allow more than only hwcap bits 2022-07-19 16:18:49 +02:00
sha512_s390.c s390/cpufeature: rework to allow more than only hwcap bits 2022-07-19 16:18:49 +02:00
sha_common.c