]> git.baikalelectronics.ru Git - kernel.git/commit
s390/zcrypt: Explicitly check input data length.
authorHarald Freudenberger <freude@linux.vnet.ibm.com>
Tue, 12 Sep 2017 05:04:26 +0000 (07:04 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 28 Sep 2017 05:29:43 +0000 (07:29 +0200)
commitd53dba49316d0e1071426281bfbb7a544a4bdac0
tree9cab1644de5f7b0de0d56207c7259eb22a6b8b04
parentf49f0db88e10a548ca9cbd09376bb5fdda0852e1
s390/zcrypt: Explicitly check input data length.

The function to prepare MEX type 50 ap messages did
not explicitly check for the data length in case of
data > 512 bytes. Instead the function assumes the
boundary check done in the ioctl function will always
reject requests with invalid data length values.
However, screening just the function code may give the
illusion, that there may be a gap which could be
exploited by userspace for buffer overwrite attacks.

Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/crypto/zcrypt_msgtype50.c