linux-stable/arch/s390
David Hildenbrand eadbd5d1ec s390/uv: fully validate the VMA before calling follow_page()
[ Upstream commit 46c22ffd27 ]

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.

Fixes: 214d9bbcd3 ("s390/mm: provide memory management functions for protected KVM guests")
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Link: https://lore.kernel.org/r/20210909162248.14969-6-david@redhat.com
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-18 19:16:40 +01:00
..
appldata s390/appldata: use struct_size() helper 2020-06-29 16:32:34 +02:00
boot Kbuild updates for v5.15 2021-09-03 15:33:47 -07:00
configs s390: update defconfigs 2021-09-15 14:29:21 +02:00
crypto s390/archrandom: add parameter check for s390_arch_random_generate 2021-04-21 12:32:12 +02:00
hypfs s390: rename dma section to amode31 2021-08-05 14:10:53 +02:00
include s390/pci: fix zpci_zdev_put() on reserve 2021-10-04 09:49:10 +02:00
kernel s390/uv: fully validate the VMA before calling follow_page() 2021-11-18 19:16:40 +01:00
kvm KVM: s390: preserve deliverable_mask in __airqs_kick_single_vcpu 2021-10-20 13:03:04 +02:00
lib s390: fix strrchr() implementation 2021-10-12 13:07:37 +02:00
mm s390/mm: fix VMA and page table handling code in storage key handling functions 2021-11-18 19:16:40 +01:00
net bpf, s390: Fix potential memory leak about jit_data 2021-10-04 09:49:10 +02:00
pci s390/pci: fix zpci_zdev_put() on reserve 2021-10-04 09:49:10 +02:00
purgatory s390: enable KCSAN 2021-07-30 17:09:23 +02:00
tools s390/disassembler: add instructions 2021-07-27 09:39:19 +02:00
Kbuild s390/numa: move code to arch/s390/kernel 2020-08-11 18:16:55 +02:00
Kconfig s390: remove WARN_DYNAMIC_STACK 2021-09-15 14:29:21 +02:00
Kconfig.debug tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig 2021-08-16 11:37:21 -04:00
Makefile s390: remove WARN_DYNAMIC_STACK 2021-09-15 14:29:21 +02:00