Date: Fri, 18 Nov 2011 19:14:42 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r227674 - head/sys/kern Message-ID: <201111181914.pAIJEgo1092919@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pho Date: Fri Nov 18 19:14:42 2011 New Revision: 227674 URL: http://svn.freebsd.org/changeset/base/227674 Log: Added check for negative seconds value. Found by syscall() fuzzing. MFC after: 1 week Modified: head/sys/kern/kern_thr.c Modified: head/sys/kern/kern_thr.c ============================================================================== --- head/sys/kern/kern_thr.c Fri Nov 18 19:12:12 2011 (r227673) +++ head/sys/kern/kern_thr.c Fri Nov 18 19:14:42 2011 (r227674) @@ -474,7 +474,8 @@ kern_thr_suspend(struct thread *td, stru } if (tsp != NULL) { - if (tsp->tv_nsec < 0 || tsp->tv_nsec > 1000000000) + if (tsp->tv_sec < 0 || tsp->tv_nsec < 0 || + tsp->tv_nsec > 1000000000) return (EINVAL); if (tsp->tv_sec == 0 && tsp->tv_nsec == 0) error = EWOULDBLOCK;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111181914.pAIJEgo1092919>