qemu-e2k/linux-user
Alex Bennée 8ef618859c linux-user: detect overflow of MAP_FIXED mmap
Relaxing the restrictions on 64 bit guests leads to the user being
able to attempt to map right at the edge of addressable memory. This
in turn lead to address overflow tripping the assert in page_set_flags
when the end address wrapped around.

Detect the wrap earlier and correctly -ENOMEM the guest (in the
reported case LTP mmap15).

Fixes: 7d8cbbabcb
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reported-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200605154929.26910-15-alex.bennee@linaro.org>
2020-06-08 17:04:19 +01:00
..
aarch64
alpha
arm
cris
generic
host
hppa
i386
m68k
microblaze
mips
mips64
nios2
openrisc
ppc
riscv
s390x
sh4
sparc
sparc64
tilegx
x86_64
xtensa
cpu_loop-common.h
elfload.c
errno_defs.h
exit.c
fd-trans.c
fd-trans.h
flat.h
flatload.c
ioctls.h
linux_loop.h
linuxload.c
main.c
Makefile.objs
mmap.c linux-user: detect overflow of MAP_FIXED mmap 2020-06-08 17:04:19 +01:00
qemu.h
safe-syscall.S
signal-common.h
signal.c
socket.h
strace.c
strace.list
syscall_defs.h
syscall_types.h
syscall.c
target_flat.h
trace-events
uaccess.c
uname.c
uname.h
vm86.c