From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 13:53:44 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB17F10656D1; Fri, 9 Jan 2009 13:53:44 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D76AD8FC1D; Fri, 9 Jan 2009 13:53:44 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09DriDl058569; Fri, 9 Jan 2009 13:53:44 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09DriYq058568; Fri, 9 Jan 2009 13:53:44 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <200901091353.n09DriYq058568@svn.freebsd.org> From: Peter Holm Date: Fri, 9 Jan 2009 13:53:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186950 - in stable/7/sys: . contrib/pf dev/cxgb kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 13:53:46 -0000 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) {