svn commit: r250055 - head/sys/fs/nfsserver
Dag-Erling Smørgrav
des at FreeBSD.org
Mon Apr 29 20:09:45 UTC 2013
Author: des
Date: Mon Apr 29 20:09:44 2013
New Revision: 250055
URL: http://svnweb.freebsd.org/changeset/base/250055
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
Modified:
head/sys/fs/nfsserver/nfs_nfsdport.c
Modified: head/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdport.c Mon Apr 29 19:30:35 2013 (r250054)
+++ head/sys/fs/nfsserver/nfs_nfsdport.c Mon Apr 29 20:09:44 2013 (r250055)
@@ -1574,6 +1574,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-head
mailing list