linux-stable/arch/s390/crypto
Herbert Xu dbc9a791a7 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:16:58 -08:00
..
aes_s390.c crypto: s390/aes - Fix buffer overread in CTR mode 2024-01-31 16:16:58 -08:00
arch_random.c s390/archrandom: simplify back to earlier design and initialize earlier 2022-06-30 19:40:36 +02:00
chacha-glue.c s390/crypto: use vector instructions only if available for ChaCha20 2023-05-24 17:32:52 +01:00
chacha-s390.h s390/crypto: add SIMD implementation for ChaCha20 2021-12-06 14:42:24 +01:00
chacha-s390.S s390: convert ".insn" encoding to instruction names 2022-03-10 15:58:17 +01: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/crc32-vx: couple of typo fixes 2021-03-24 16:06:19 +01:00
crc32le-vx.S s390: add missing ENDPROC statements to assembler functions 2019-05-02 13:54:11 +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:16:58 -08:00
prng.c s390/cpufeature: rework to allow more than only hwcap bits 2022-07-19 16:18:49 +02:00
sha.h crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
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 s390/crypto: Fix unsigned variable compared with zero 2019-11-20 12:58:12 +01:00