svn commit: r250060 - stable/9/sys/fs/nfsserver

Dag-Erling Smørgrav des at FreeBSD.org
Mon Apr 29 20:15:58 UTC 2013


Author: des
Date: Mon Apr 29 20:15:55 2013
New Revision: 250060
URL: http://svnweb.freebsd.org/changeset/base/250060

Log:
  Fix a bug that allows NFS clients to issue READDIR on files.
  
  PR:		kern/178016
  Security:	CVE-2013-3266
  Security:	FreeBSD-SA-13:05.nfsserver
  Approved by:	so

Modified:
  stable/9/sys/fs/nfsserver/nfs_nfsdport.c

Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- stable/9/sys/fs/nfsserver/nfs_nfsdport.c	Mon Apr 29 20:15:47 2013	(r250059)
+++ stable/9/sys/fs/nfsserver/nfs_nfsdport.c	Mon Apr 29 20:15:55 2013	(r250060)
@@ -1575,6 +1575,8 @@ nfsrvd_readdir(struct nfsrv_descript *nd
 			nd->nd_repstat = NFSERR_BAD_COOKIE;
 #endif
 	}
+	if (!nd->nd_repstat && vp->v_type != VDIR)
+		nd->nd_repstat = NFSERR_NOTDIR;
 	if (nd->nd_repstat == 0 && cnt == 0) {
 		if (nd->nd_flag & ND_NFSV2)
 			/* NFSv2 does not have NFSERR_TOOSMALL */


More information about the svn-src-all mailing list