Re: kevent, nanosleep: tighten valid range for incoming tv_nsec

2018-05-14 Thread Theo Buehler
On Fri, May 11, 2018 at 05:54:17PM -0500, Scott Cheloha wrote: > Hi, > > This fixes timeout input validation for kevent(2) and nanosleep(2). > > nanosleep() and kqueue_scan() (callee of kevent()) both convert the > incoming timespec to a timeval with TIMESPEC_TO_TIMEVAL *before* > validating the

kevent, nanosleep: tighten valid range for incoming tv_nsec

2018-05-11 Thread Scott Cheloha
Hi, This fixes timeout input validation for kevent(2) and nanosleep(2). nanosleep() and kqueue_scan() (callee of kevent()) both convert the incoming timespec to a timeval with TIMESPEC_TO_TIMEVAL *before* validating the timeout. This hides invalid tv_nsec values on [-999, 0) and (10, 100