s390/pci_mmio: fully validate the VMA before calling follow_pte()
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 dd2283f2 ("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: dd2283f2 ("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>
parent
6880fa6c
Please register or sign in to comment