linux-brain/arch/s390
David Hildenbrand 6bfdc3056c s390/pci_mmio: fully validate the VMA before calling follow_pte()
commit a8b92b8c1eac8d655a97b1e90f4d83c25d9b9a18 upstream.

We should not walk/touch page tables outside of VMA boundaries when
holding only the mmap sem in read mode. Evil user space can modify the
VMA layout just before this function runs and e.g., trigger races with
page table removal code since commit dd2283f260 ("mm: mmap: zap pages
with read mmap_sem in munmap").

find_vma() does not check if the address is >= the VMA start address;
use vma_lookup() instead.

Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Fixes: dd2283f260 ("mm: mmap: zap pages with read mmap_sem in munmap")
Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-26 14:07:06 +02:00
..
appldata proc/sysctl: add shared variables for range check 2019-07-18 17:08:07 -07:00
boot s390/boot: fix use of expolines in the DMA code 2021-07-28 13:30:58 +02:00
configs s390: update defconfigs 2019-10-04 16:37:33 +02:00
crypto s390/archrandom: add parameter check for s390_arch_random_generate 2021-05-11 14:04:13 +02:00
hypfs Merge branch 'work.mount3' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-09-24 12:33:34 -07:00
include s390: make PCI mio support a machine flag 2021-09-22 12:26:29 +02:00
kernel s390: make PCI mio support a machine flag 2021-09-22 12:26:29 +02:00
kvm KVM: s390: index kvm->arch.idle_mask by vcpu_idx 2021-09-15 09:47:40 +02:00
lib s390/mm: fix page table upgrade vs 2ndary address mode accesses 2020-04-29 16:33:25 +02:00
mm s390/pv: fix the forcing of the swiotlb 2021-09-22 12:26:37 +02:00
net s390/bpf: Fix 64-bit subtraction of the -0x80000000 constant 2021-09-22 12:26:46 +02:00
numa s390/numa: set node distance to LOCAL_DISTANCE 2020-09-03 11:26:50 +02:00
oprofile s390/unwind: introduce stack unwind API 2019-05-02 13:54:11 +02:00
pci s390/pci_mmio: fully validate the VMA before calling follow_pte() 2021-09-26 14:07:06 +02:00
purgatory s390/kexec_file: fix diag308 subcode when loading crash kernel 2020-12-30 11:51:34 +01:00
scripts s390/build: use size command to perform empty .bss check 2019-08-08 14:36:53 +02:00
tools s390: add support for IBM z15 machines 2019-09-13 12:19:14 +02:00
Kbuild s390/kexec_file: Add purgatory 2018-04-16 09:10:22 +02:00
Kconfig s390: appldata depends on PROC_SYSCTL 2021-07-14 16:53:42 +02:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile s390: make 'install' not depend on vmlinux 2020-03-12 13:00:13 +01:00