linux-stable/arch/s390
Heiko Carstens f45655f6a6 s390/uaccess: fix strncpy_from_user/strnlen_user zero maxlen case
If the maximum length specified for the to be accessed string for
strncpy_from_user() and strnlen_user() is zero the following incorrect
values would be returned or incorrect memory accesses would happen:

strnlen_user_std() and strnlen_user_pt() incorrectly return "1"
strncpy_from_user_pt() would incorrectly access "dst[maxlen - 1]"
strncpy_from_user_mvcos() would incorrectly return "-EFAULT"

Fix all these oddities by adding early checks.

Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-02-28 09:37:08 +01:00
..
appldata s390/time: rename tod clock access functions 2013-02-14 15:55:10 +01:00
boot s390: fix linker script for 31 bit builds 2012-10-18 17:50:10 +02:00
crypto s390/crypto: Don't panic after crypto instruction failures 2012-11-23 11:14:27 +01:00
hypfs Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-02-26 20:16:07 -08:00
include s390/page table dumper: add support for change-recording override bit 2013-02-28 09:37:06 +01:00
kernel hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
kvm Merge tag 'kvm-3.9-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2013-02-24 13:07:18 -08:00
lib s390/uaccess: fix strncpy_from_user/strnlen_user zero maxlen case 2013-02-28 09:37:08 +01:00
math-emu s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
mm s390/mm: ignore change bit for vmemmap 2013-02-28 09:37:06 +01:00
net s390/bpf,jit: add vlan tag support 2013-02-14 15:55:20 +01:00
oprofile s390/irq: remove split irq fields from /proc/stat 2013-01-08 10:57:07 +01:00
pci hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
defconfig s390: update defconfig 2012-09-26 15:45:29 +02:00
Kbuild s390/pci: base support 2012-11-30 15:40:45 +01:00
Kconfig arch Kconfig: centralise CONFIG_ARCH_NO_VIRT_TO_BUS 2013-02-27 19:10:23 -08:00
Kconfig.debug s390/mm: add page table dumper 2012-10-09 14:16:58 +02:00
Makefile s390: use -fPIC for module compile 2013-01-12 18:49:26 +01:00