Date: Mon, 29 Apr 2013 20:09:45 +0000 (UTC) From: Dag-Erling Smørgrav <des@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250055 - head/sys/fs/nfsserver Message-ID: <201304292009.r3TK9jlZ062348@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304292009.r3TK9jlZ062348>