PR: kern/178016 Security: CVE-2013-3266 Security: FreeBSD-SA-13:05.nfsserver Approved by: so
13 lines
535 B
Diff
13 lines
535 B
Diff
Index: sys/fs/nfsserver/nfs_nfsdport.c
|
|
===================================================================
|
|
--- sys/fs/nfsserver/nfs_nfsdport.c (revision 249651)
|
|
+++ sys/fs/nfsserver/nfs_nfsdport.c (working copy)
|
|
@@ -1568,6 +1568,8 @@ nfsrvd_readdir(struct nfsrv_descript *nd, int isdg
|
|
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 */
|