]> Git Repo - qemu.git/commit
linux-user: detect overflow of MAP_FIXED mmap
authorAlex Bennée <[email protected]>
Fri, 5 Jun 2020 15:49:29 +0000 (16:49 +0100)
committerAlex Bennée <[email protected]>
Mon, 8 Jun 2020 16:04:19 +0000 (17:04 +0100)
commit8ef618859c379fdce81c91bc93e0574e36ea76ff
tree26aa711b59a46fdec88fbfd6eaa08ef34377d847
parentb6771210b5bba543628b8eeacfea9f994372f880
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 <[email protected]>
Reported-by: Laurent Vivier <[email protected]>
Message-Id: <20200605154929[email protected]>
linux-user/mmap.c
This page took 0.023985 seconds and 4 git commands to generate.