]> Git Repo - qemu.git/commit - linux-user/syscall.c
linux-user: Check for bad event numbers in epoll_wait
authorPeter Maydell <[email protected]>
Mon, 18 Jul 2016 14:35:59 +0000 (15:35 +0100)
committerRiku Voipio <[email protected]>
Wed, 21 Sep 2016 11:25:26 +0000 (14:25 +0300)
commit2ba7fae3bd688f5bb6cb08defc731d77e6bd943c
treea2138d834c2f9d056db7c55b26118b554865be46
parent700fa58e4b9100d6bd77df06d2e5d1f457720c4d
linux-user: Check for bad event numbers in epoll_wait

The kernel checks that the maxevents parameter to epoll_wait
is non-negative and not larger than EP_MAX_EVENTS. Add this
check to our implementation, so that:
 * we fail these cases EINVAL rather than EFAULT
 * we don't pass negative or overflowing values to the
   lock_user() size calculation

Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
linux-user/syscall.c
linux-user/syscall_defs.h
This page took 0.023409 seconds and 4 git commands to generate.