All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfs: deny backchannel RPCs with an incorrect authflavor instead of dropping them
@ 2015-06-04 22:40 Jeff Layton
  2015-06-17 11:35 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Layton @ 2015-06-04 22:40 UTC (permalink / raw)
  To: trond.myklebust; +Cc: William.Adamson, linux-nfs

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>
---
 fs/nfs/callback.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index 8d129bb7355a..682529c00996 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -458,7 +458,7 @@ check_gss_callback_principal(struct nfs_client *clp, struct svc_rqst *rqstp)
  * pg_authenticate method for nfsv4 callback threads.
  *
  * The authflavor has been negotiated, so an incorrect flavor is a server
- * bug. Drop packets with incorrect authflavor.
+ * bug. Deny packets with incorrect authflavor.
  *
  * All other checking done after NFS decoding where the nfs_client can be
  * found in nfs4_callback_compound
@@ -468,12 +468,12 @@ static int nfs_callback_authenticate(struct svc_rqst *rqstp)
 	switch (rqstp->rq_authop->flavour) {
 	case RPC_AUTH_NULL:
 		if (rqstp->rq_proc != CB_NULL)
-			return SVC_DROP;
+			return SVC_DENIED;
 		break;
 	case RPC_AUTH_GSS:
 		/* No RPC_AUTH_GSS support yet in NFSv4.1 */
 		 if (svc_is_backchannel(rqstp))
-			return SVC_DROP;
+			return SVC_DENIED;
 	}
 	return SVC_OK;
 }
-- 
2.4.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] nfs: deny backchannel RPCs with an incorrect authflavor instead of dropping them
  2015-06-04 22:40 [PATCH] nfs: deny backchannel RPCs with an incorrect authflavor instead of dropping them Jeff Layton
@ 2015-06-17 11:35 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2015-06-17 11:35 UTC (permalink / raw)
  To: Jeff Layton; +Cc: trond.myklebust, William.Adamson, linux-nfs

On Thu, Jun 04, 2015 at 06:40:13PM -0400, Jeff Layton wrote:
> 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>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-17 11:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-04 22:40 [PATCH] nfs: deny backchannel RPCs with an incorrect authflavor instead of dropping them Jeff Layton
2015-06-17 11:35 ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.