From owner-svn-src-stable@FreeBSD.ORG Thu May 14 11:03:06 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F1881065670; Thu, 14 May 2009 11:03:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D5428FC17; Thu, 14 May 2009 11:03:06 +0000 (UTC) (envelope-from kib@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 n4EB36K0089217; Thu, 14 May 2009 11:03:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4EB36g2089216; Thu, 14 May 2009 11:03:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200905141103.n4EB36g2089216@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 14 May 2009 11:03:06 +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: r192095 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2009 11:03:07 -0000 Author: kib Date: Thu May 14 11:03:05 2009 New Revision: 192095 URL: http://svn.freebsd.org/changeset/base/192095 Log: MFC r192001: Prevent overflow of uio_resid. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (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 Thu May 14 10:54:57 2009 (r192094) +++ stable/7/sys/kern/vfs_syscalls.c Thu May 14 11:03:05 2009 (r192095) @@ -2360,6 +2360,9 @@ kern_readlink(struct thread *td, char *p struct nameidata nd; int vfslocked; + if (count > INT_MAX) + return (EINVAL); + NDINIT(&nd, LOOKUP, NOFOLLOW | LOCKSHARED | LOCKLEAF | MPSAFE | AUDITVNODE1, pathseg, path, td); if ((error = namei(&nd)) != 0)