linux-brain/arch/s390/crypto
Harald Freudenberger a65181cfd9 s390/archrandom: add parameter check for s390_arch_random_generate
[ Upstream commit 28096067686c5a5cbd4c35b079749bd805df5010 ]

A review of the code showed, that this function which is exposed
within the whole kernel should do a parameter check for the
amount of bytes requested. If this requested bytes is too high
an unsigned int overflow could happen causing this function to
try to memcpy a really big memory chunk.

This is not a security issue as there are only two invocations
of this function from arch/s390/include/asm/archrandom.h and both
are not exposed to userland.

Reported-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-11 14:04:13 +02:00
..
Makefile s390/crypto: Support for SHA3 via CPACF (MSA6) 2019-09-13 12:18:50 +02:00
aes_s390.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-09-18 12:11:14 -07:00
arch_random.c s390/archrandom: add parameter check for s390_arch_random_generate 2021-05-11 14:04:13 +02:00
crc32-vx.c crypto: hash - annotate algorithms taking optional key 2018-01-12 23:03:35 +11:00
crc32be-vx.S s390: add missing ENDPROC statements to assembler functions 2019-05-02 13:54:11 +02:00
crc32le-vx.S s390: add missing ENDPROC statements to assembler functions 2019-05-02 13:54:11 +02:00
des_s390.c crypto: s390/des - switch to new verification routines 2019-08-22 14:39:37 +10:00
ghash_s390.c crypto: ghash - add comment and improve help text 2019-07-27 21:08:38 +10:00
paes_s390.c s390/paes: Prepare paes functions for large key blobs 2019-08-21 12:58:54 +02:00
prng.c s390/crypto: prng: Use -ENODEV instead of -EOPNOTSUPP 2019-06-15 12:24:44 +02:00
sha.h s390/crypto: Support for SHA3 via CPACF (MSA6) 2019-09-13 12:18:50 +02:00
sha1_s390.c s390/crypto: sha: Use -ENODEV instead of -EOPNOTSUPP 2019-06-15 12:24:48 +02:00
sha3_256_s390.c s390/crypto: Support for SHA3 via CPACF (MSA6) 2019-09-13 12:18:50 +02:00
sha3_512_s390.c s390/crypto: Support for SHA3 via CPACF (MSA6) 2019-09-13 12:18:50 +02:00
sha256_s390.c crypto: s390 - Rename functions to avoid conflict with crypto/sha256.h 2019-09-05 14:37:30 +10:00
sha512_s390.c s390/crypto: sha: Use -ENODEV instead of -EOPNOTSUPP 2019-06-15 12:24:48 +02:00
sha_common.c s390/crypto: Fix unsigned variable compared with zero 2019-12-31 16:45:41 +01:00