linux/arch/um
Johannes Berg 5b5d760280 um: mm: check more comprehensively for stub changes
commit 47da29763ec9a153b9b685bff9db659e4e09e494 upstream.

If userspace tries to change the stub, we need to kill it,
because otherwise it can escape the virtual machine. In a
few cases the stub checks weren't good, e.g. if userspace
just tries to

	mmap(0x100000 - 0x1000, 0x3000, ...)

it could succeed to get a new private/anonymous mapping
replacing the stubs. Fix this by checking everywhere, and
checking for _overlap_, not just direct changes.

Cc: stable@vger.kernel.org
Fixes: 3963333fe6 ("uml: cover stubs with a VMA")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-04 10:26:50 +01:00
..
configs um: configs: Remove useless UEVENT_HELPER_PATH 2019-07-02 23:27:41 +02:00
drivers um: virtio: free vu_dev only with the contained struct device 2021-02-10 09:25:27 +01:00
include Revert "um: Enable CONFIG_CONSTRUCTORS" 2020-02-01 09:34:53 +00:00
kernel um: mm: check more comprehensively for stub changes 2021-03-04 10:26:50 +01:00
os-Linux um: Remove use of asprinf in umid.c 2020-12-30 11:51:39 +01:00
scripts License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
.gitignore
Kconfig um: Implement copy_thread_tls 2020-01-14 20:08:35 +01:00
Kconfig.debug um: Make GCOV depend on !KCOV 2018-12-27 22:48:19 +01:00
Makefile um: ensure `make ARCH=um mrproper` removes arch/$(SUBARCH)/include/generated/ 2020-05-02 08:48:53 +02:00
Makefile-os-Linux
Makefile-skas