Date: Thu, 12 Jan 2012 08:03:26 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r230008 - stable/9/sys/kern Message-ID: <201201120803.q0C83QmQ099166@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pho Date: Thu Jan 12 08:03:26 2012 New Revision: 230008 URL: http://svn.freebsd.org/changeset/base/230008 Log: MFC: r227674 Added check for negative seconds value. Found by syscall() fuzzing. Modified: stable/9/sys/kern/kern_thr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_thr.c ============================================================================== --- stable/9/sys/kern/kern_thr.c Thu Jan 12 06:48:11 2012 (r230007) +++ stable/9/sys/kern/kern_thr.c Thu Jan 12 08:03:26 2012 (r230008) @@ -473,7 +473,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?201201120803.q0C83QmQ099166>