Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 May 2009 11:03:06 +0000 (UTC)
From:      Konstantin Belousov <kib@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: r192095 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern
Message-ID:  <200905141103.n4EB36g2089216@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



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