OSDN Git Service

linux-user: Range check the nfds argument to ppoll syscall
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 18 Jul 2016 15:30:36 +0000 (16:30 +0100)
committerRiku Voipio <riku.voipio@linaro.org>
Wed, 21 Sep 2016 11:25:53 +0000 (14:25 +0300)
commitce9c139d93db03e464341385976606b7568b768f
treef948812bc2eac2e2da2258b94a0461e0970059ea
parent2ba7fae3bd688f5bb6cb08defc731d77e6bd943c
linux-user: Range check the nfds argument to ppoll syscall

Do an initial range check on the ppoll syscall's nfds argument,
to avoid possible overflow in the calculation of the lock_user()
size argument. The host kernel will later apply the rather lower
limit based on RLIMIT_NOFILE as appropriate.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user/syscall.c