Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Jan 2009 13:53:44 +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-7@freebsd.org
Subject:   svn commit: r186950 - in stable/7/sys: . contrib/pf dev/cxgb kern
Message-ID:  <200901091353.n09DriYq058568@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pho
Date: Fri Jan  9 13:53:44 2009
New Revision: 186950
URL: http://svn.freebsd.org/changeset/base/186950

Log:
  MFC r186510:
  Prevent overflow of uio_resid.
  
  Approved by:	kib

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/kern/vfs_syscalls.c

Modified: stable/7/sys/kern/vfs_syscalls.c
==============================================================================
--- stable/7/sys/kern/vfs_syscalls.c	Fri Jan  9 13:18:13 2009	(r186949)
+++ stable/7/sys/kern/vfs_syscalls.c	Fri Jan  9 13:53:44 2009	(r186950)
@@ -3800,6 +3800,8 @@ kern_getdirentries(struct thread *td, in
 	int error, eofflag;
 
 	AUDIT_ARG(fd, fd);
+	if (count > INT_MAX)
+		return (EINVAL);
 	if ((error = getvnode(td->td_proc->p_fd, fd, &fp)) != 0)
 		return (error);
 	if ((fp->f_flag & FREAD) == 0) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901091353.n09DriYq058568>