MFC: r281962

Fix the NFS server's handling of a bogus NFSv2 ROOT RPC.
The ROOT RPC is deprecated in the NFSv2 RFC, RFC-1094
and should never be used by a client.
This commit is contained in:
rmacklem 2015-05-02 12:18:28 +00:00
parent 3b4742adf3
commit cb89ee4fb1

View File

@ -120,7 +120,8 @@ nfssvc_program(struct svc_req *rqst, SVCXPRT *xprt)
memset(&nd, 0, sizeof(nd));
if (rqst->rq_vers == NFS_VER2) {
if (rqst->rq_proc > NFSV2PROC_STATFS) {
if (rqst->rq_proc > NFSV2PROC_STATFS ||
newnfs_nfsv3_procid[rqst->rq_proc] == NFSPROC_NOOP) {
svcerr_noproc(rqst);
svc_freereq(rqst);
goto out;