Skip to content

Commit 6f02dc8

Browse files
jtlaytontrondmypd
authored andcommitted
nfs: deny backchannel RPCs with an incorrect authflavor instead of dropping them
A drop should really only be done when the frame is malformed or we have reason to think that there is some sort of DoS going on. When we get an RPC with bad auth, we should send back an error instead. Cc: Andy Adamson <William.Adamson@netapp.com> Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
1 parent 5fd23f7 commit 6f02dc8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎fs/nfs/callback.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ check_gss_callback_principal(struct nfs_client *clp, struct svc_rqst *rqstp)
458458
* pg_authenticate method for nfsv4 callback threads.
459459
*
460460
* The authflavor has been negotiated, so an incorrect flavor is a server
461-
* bug. Drop packets with incorrect authflavor.
461+
* bug. Deny packets with incorrect authflavor.
462462
*
463463
* All other checking done after NFS decoding where the nfs_client can be
464464
* found in nfs4_callback_compound
@@ -468,12 +468,12 @@ static int nfs_callback_authenticate(struct svc_rqst *rqstp)
468468
switch (rqstp->rq_authop->flavour) {
469469
case RPC_AUTH_NULL:
470470
if (rqstp->rq_proc != CB_NULL)
471-
return SVC_DROP;
471+
return SVC_DENIED;
472472
break;
473473
case RPC_AUTH_GSS:
474474
/* No RPC_AUTH_GSS support yet in NFSv4.1 */
475475
if (svc_is_backchannel(rqstp))
476-
return SVC_DROP;
476+
return SVC_DENIED;
477477
}
478478
return SVC_OK;
479479
}

0 commit comments

Comments
 (0)