android_kernel_oneplus_msm8998/arch/s390
Yihui ZENG 1cdb536076 s390/cmm: fix information leak in cmm_timeout_handler()
commit b8e51a6a9db94bc1fb18ae831b3dab106b5a4b5f upstream.

The problem is that we were putting the NUL terminator too far:

	buf[sizeof(buf) - 1] = '\0';

If the user input isn't NUL terminated and they haven't initialized the
whole buffer then it leads to an info leak.  The NUL terminator should
be:

	buf[len - 1] = '\0';

Signed-off-by: Yihui Zeng <yzeng56@asu.edu>
Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
[heiko.carstens@de.ibm.com: keep semantics of how *lenp and *ppos are handled]
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-06 12:09:21 +01:00
..
appldata s390: appldata: drop owner assignment from platform_drivers 2014-10-20 16:20:13 +02:00
boot s390/decompressor: fix initrd corruption caused by bss clear 2017-04-12 12:38:34 +02:00
configs s390/defconfig: set SCSI_DH=y 2015-10-01 10:48:36 +02:00
crypto s390/crypto: unlock on error in prng_tdes_read() 2017-01-12 11:22:49 +01:00
hypfs hypfs: Fix error number left in struct pointer member 2019-10-07 21:01:02 +02:00
include s390: fix stfle zero padding 2019-07-21 09:07:15 +02:00
kernel s390/topology: avoid firing events before kobjs are created 2019-10-17 13:40:52 -07:00
kvm KVM: s390: Test for bad access register and size at the start of S390_MEM_OP 2019-10-17 13:40:52 -07:00
lib s390/lib: use expoline for all bcr instructions 2018-09-15 09:40:42 +02:00
mm s390/cmm: fix information leak in cmm_timeout_handler() 2019-11-06 12:09:21 +01:00
net s390/bpf: use 32-bit index for tail calls 2019-09-21 07:12:49 +02:00
numa s390/mm: Fix ERROR: "__node_distance" undefined! 2018-11-27 16:08:01 +01:00
oprofile s390/oprofile: fix compile error 2015-07-01 09:34:39 +02:00
pci s390/pci: fix out of bounds access during irq setup 2018-09-05 09:18:40 +02:00
defconfig s390: new default configuration 2015-06-25 09:39:25 +02:00
Kbuild s390/numa: add core infrastructure 2015-08-03 18:40:25 +02:00
Kconfig s390: add sysfs attributes for spectre 2018-04-29 07:50:04 +02:00
Kconfig.debug
Makefile s390: add automatic detection of the spectre defense 2018-04-29 07:50:04 +02:00