From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 15:13:47 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 418C61065691; Fri, 9 Jan 2009 15:13:47 +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 2F2AC8FC0A; Fri, 9 Jan 2009 15:13:47 +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 n09FDlLY060242; Fri, 9 Jan 2009 15:13:47 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09FDluo060241; Fri, 9 Jan 2009 15:13:47 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <200901091513.n09FDluo060241@svn.freebsd.org> From: Peter Holm Date: Fri, 9 Jan 2009 15:13:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186954 - in stable/6/sys: . 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 15:13:48 -0000 Author: pho Date: Fri Jan 9 15:13:46 2009 New Revision: 186954 URL: http://svn.freebsd.org/changeset/base/186954 Log: MFC r186510: Prevent overflow of uio_resid. Approved by: kib Modified: stable/6/sys/ (props changed) stable/6/sys/kern/vfs_syscalls.c Modified: stable/6/sys/kern/vfs_syscalls.c ============================================================================== --- stable/6/sys/kern/vfs_syscalls.c Fri Jan 9 14:41:36 2009 (r186953) +++ stable/6/sys/kern/vfs_syscalls.c Fri Jan 9 15:13:46 2009 (r186954) @@ -3697,6 +3697,8 @@ getdirentries(td, uap) int error, eofflag; AUDIT_ARG(fd, uap->fd); + if (uap->count > INT_MAX) + return (EINVAL); if ((error = getvnode(td->td_proc->p_fd, uap->fd, &fp)) != 0) return (error); if ((fp->f_flag & FREAD) == 0) {