diff options
author | Ricardo Labiaga <Ricardo.Labiaga@netapp.com> | 2009-12-12 04:10:49 +0100 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2010-01-13 15:42:26 +0100 |
commit | c551866e649bac66a5145d100f34086d6edb581e (patch) | |
tree | ff6362dc3d14841575a42d30fb605a178793dcb1 /fs/nfsd | |
parent | Linux 2.6.33-rc4 (diff) | |
download | linux-c551866e649bac66a5145d100f34086d6edb581e.tar.xz linux-c551866e649bac66a5145d100f34086d6edb581e.zip |
nfsd41: nfsd4_decode_compound() does not recognize all ops
The server incorrectly assumes that the operations in the
array start with value 0. The first operation (OP_ACCESS)
has a value of 3, causing the check in nfsd4_decode_compound
to be off.
Instead of comparing that the operation number is less than
the number of elements in the array, the server should verify
that it is less than the maximum valid operation number
defined by LAST_NFS4_OP.
Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index a8587e90fd5a..4f14f0c0616f 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -1434,7 +1434,7 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp) } op->opnum = ntohl(*argp->p++); - if (op->opnum >= OP_ACCESS && op->opnum < ops->nops) + if (op->opnum >= OP_ACCESS && op->opnum <= LAST_NFS4_OP) op->status = ops->decoders[op->opnum](argp, &op->u); else { op->opnum = OP_ILLEGAL; |