Skip to content

Commit 11716cb

Browse files
author
Olga Kornievskaia
committed
nfsd: nfsd4_spo_must_allow() must check this is a v4 compound request
JIRA: https://issues.redhat.com/browse/RHEL-82689 commit 1244f0b Author: NeilBrown <neil@brown.name> Date: Fri Mar 28 11:05:59 2025 +1100 nfsd: nfsd4_spo_must_allow() must check this is a v4 compound request If the request being processed is not a v4 compound request, then examining the cstate can have undefined results. This patch adds a check that the rpc procedure being executed (rq_procinfo) is the NFSPROC4_COMPOUND procedure. Reported-by: Olga Kornievskaia <okorniev@redhat.com> Cc: stable@vger.kernel.org Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Olga Kornievskaia <okorniev@redhat.com>
1 parent b139cd7 commit 11716cb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/nfsd/nfs4proc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3763,7 +3763,8 @@ bool nfsd4_spo_must_allow(struct svc_rqst *rqstp)
37633763
struct nfs4_op_map *allow = &cstate->clp->cl_spo_must_allow;
37643764
u32 opiter;
37653765

3766-
if (!cstate->minorversion)
3766+
if (rqstp->rq_procinfo != &nfsd_version4.vs_proc[NFSPROC4_COMPOUND] ||
3767+
cstate->minorversion == 0)
37673768
return false;
37683769

37693770
if (cstate->spo_must_allowed)

0 commit comments

Comments
 (0)