From cb89ee4fb1be766544fdf12d5c9504049d4ec2a8 Mon Sep 17 00:00:00 2001 From: rmacklem Date: Sat, 2 May 2015 12:18:28 +0000 Subject: [PATCH] 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. --- sys/fs/nfsserver/nfs_nfsdkrpc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/fs/nfsserver/nfs_nfsdkrpc.c b/sys/fs/nfsserver/nfs_nfsdkrpc.c index e63ddf7526c7..1394d0ab8027 100644 --- a/sys/fs/nfsserver/nfs_nfsdkrpc.c +++ b/sys/fs/nfsserver/nfs_nfsdkrpc.c @@ -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;