svn commit: r250058 - stable/8/sys/fs/nfsserver
Dag-Erling Smørgrav
des at FreeBSD.org
Mon Apr 29 20:15:44 UTC 2013
Author: des
Date: Mon Apr 29 20:15:43 2013
New Revision: 250058
URL: http://svnweb.freebsd.org/changeset/base/250058
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/8/sys/fs/nfsserver/nfs_nfsdport.c
Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- stable/8/sys/fs/nfsserver/nfs_nfsdport.c Mon Apr 29 20:14:11 2013 (r250057)
+++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c Mon Apr 29 20:15:43 2013 (r250058)
@@ -1569,6 +1569,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-stable-8
mailing list