mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
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>
This commit is contained in:
parent
0813c5f012
commit
1244f0b2c3
|
|
@ -3777,7 +3777,8 @@ bool nfsd4_spo_must_allow(struct svc_rqst *rqstp)
|
|||
struct nfs4_op_map *allow = &cstate->clp->cl_spo_must_allow;
|
||||
u32 opiter;
|
||||
|
||||
if (!cstate->minorversion)
|
||||
if (rqstp->rq_procinfo != &nfsd_version4.vs_proc[NFSPROC4_COMPOUND] ||
|
||||
cstate->minorversion == 0)
|
||||
return false;
|
||||
|
||||
if (cstate->spo_must_allowed)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user