Commit 804d8e0
committed
NFSD: Avoid calling OPDESC() with ops->opnum == OP_ILLEGAL
OPDESC() simply indexes into nfsd4_ops[] by the op's operation
number, without range checking that value. It assumes callers are
careful to avoid calling it with an out-of-bounds opnum value.
nfsd4_decode_compound() is not so careful, and can invoke OPDESC()
with opnum set to OP_ILLEGAL, which is 10044 -- well beyond the end
of nfsd4_ops[].
Reported-by: Jeff Layton <jlayton@kernel.org>
Fixes: f4f9ef4 ("nfsd4: opdesc will be useful outside nfs4proc.c")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>1 parent 5f24a87 commit 804d8e0
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2476 | 2476 | | |
2477 | 2477 | | |
2478 | 2478 | | |
| 2479 | + | |
2479 | 2480 | | |
2480 | 2481 | | |
2481 | 2482 | | |
2482 | 2483 | | |
| 2484 | + | |
2483 | 2485 | | |
2484 | 2486 | | |
2485 | 2487 | | |
| |||
2490 | 2492 | | |
2491 | 2493 | | |
2492 | 2494 | | |
2493 | | - | |
| 2495 | + | |
2494 | 2496 | | |
2495 | 2497 | | |
2496 | 2498 | | |
| |||
0 commit comments