]> 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)
commit654511493bee222ed1d0f5caa10f83163ee7c79f
tree9cab1644de5f7b0de0d56207c7259eb22a6b8b04
parente93c092335ad784d52be07f79ba613f81080f82a
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