diff options
| author | Olga Kornievskaia <okorniev@redhat.com> | 2025-03-21 20:13:04 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-10-19 16:34:06 +0200 |
| commit | 996b8797d62f40f2507075083ffd2bb9e11e0c04 (patch) | |
| tree | b4d73ef290d79768dfd7e8ff08f2cb67daf02618 | |
| parent | 4c4d66e8110e06aa4b65a433230810f693c8447d (diff) | |
| download | linux-996b8797d62f40f2507075083ffd2bb9e11e0c04.tar.gz linux-996b8797d62f40f2507075083ffd2bb9e11e0c04.tar.bz2 linux-996b8797d62f40f2507075083ffd2bb9e11e0c04.zip | |
nfsd: fix access checking for NLM under XPRTSEC policies
commit 0813c5f01249dbc32ccbc68d27a24fde5bf2901c upstream.
When an export policy with xprtsec policy is set with "tls"
and/or "mtls", but an NFS client is doing a v3 xprtsec=tls
mount, then NLM locking calls fail with an error because
there is currently no support for NLM with TLS.
Until such support is added, allow NLM calls under TLS-secured
policy.
Fixes: 4cc9b9f2bf4d ("nfsd: refine and rename NFSD_MAY_LOCK")
Cc: stable@vger.kernel.org
Signed-off-by: Olga Kornievskaia <okorniev@redhat.com>
Reviewed-by: NeilBrown <neil@brown.name>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | fs/nfsd/export.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index aa4712362b3b..1a8a94dcc60a 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -1115,7 +1115,8 @@ __be32 check_nfsd_access(struct svc_export *exp, struct svc_rqst *rqstp, test_bit(XPT_PEER_AUTH, &xprt->xpt_flags)) goto ok; } - goto denied; + if (!may_bypass_gss) + goto denied; ok: /* legacy gss-only clients are always OK: */ |
