Skip to content

Commit

Permalink
Revert "SUNRPC: Fail faster on bad verifier"
Browse files Browse the repository at this point in the history
This reverts commit 0701214.

The premise of this commit was incorrect. There are exactly 2 cases
where rpcauth_checkverf() will return an error:

1) If there was an XDR decode problem (i.e. garbage data).
2) If gss_validate() had a problem verifying the RPCSEC_GSS MIC.

In the second case, there are again 2 subcases:

a) The GSS context expires, in which case gss_validate() will force a
   new context negotiation on retry by invalidating the cred.
b) The sequence number check failed because an RPC call timed out, and
   the client retransmitted the request using a new sequence number,
   as required by RFC2203.

In neither subcase is this a fatal error.

Reported-by: Russell Cattelan <cattelan@thebarn.com>
Fixes: 0701214 ("SUNRPC: Fail faster on bad verifier")
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
  • Loading branch information
Trond Myklebust authored and amschuma-ntap committed Sep 13, 2023
1 parent 611fa42 commit e86fcf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2725,7 +2725,7 @@ rpc_decode_header(struct rpc_task *task, struct xdr_stream *xdr)

out_verifier:
trace_rpc_bad_verifier(task);
goto out_err;
goto out_garbage;

out_msg_denied:
error = -EACCES;
Expand Down

0 comments on commit e86fcf0

Please sign in to comment.