linux-brain/arch/um/kernel
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
..
skas um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
Makefile um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
asm-offsets.c um: get rid of pointless include "..." where include <...> will do 2012-10-09 22:28:45 +02:00
config.c.in um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
dyn.lds.S Revert "um: Enable CONFIG_CONSTRUCTORS" 2020-02-01 09:34:53 +00:00
early_printk.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
exec.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
exitcode.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
gmon_syms.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
gprof_syms.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
initrd.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
irq.c um: irq: Fix LAST_IRQ usage in init_IRQ() 2019-09-16 08:38:58 +02:00
kmsg_dump.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ksyms.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
maccess.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mem.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
physmem.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
process.c um: Implement copy_thread_tls 2020-01-14 20:08:35 +01:00
ptrace.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
reboot.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
sigio.c um: change sigio_spinlock to a mutex 2020-11-05 11:43:14 +01:00
signal.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
stacktrace.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
syscall.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
sysrq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
time.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
tlb.c um: mm: check more comprehensively for stub changes 2021-03-04 10:26:50 +01:00
trap.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
um_arch.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
umid.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
uml.lds.S um: Place (soft)irq text with macros 2019-09-15 21:37:12 +02:00
vmlinux.lds.S arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0 2009-09-20 12:28:22 +02:00