From: Olga Kornievskaia <okorniev@redhat.com>
To: chuck.lever@oracle.com, jlayton@kernel.org
Cc: linux-nfs@vger.kernel.org, neilb@suse.de, Dai.Ngo@oracle.com,
tom@talpey.com, Olga Kornievskaia <okorniev@redhat.com>
Subject: [PATCH 0/3] access checking fixes for NLM under security policies
Date: Fri, 21 Mar 2025 20:13:03 -0400 [thread overview]
Message-ID: <20250322001306.41666-1-okorniev@redhat.com> (raw)
Since commit 4cc9b9f2bf4df ("nfsd: refine and rename NFSD_MAY_LOCK")
for export policies with "sec=krb5:..." or "xprtsec=tls:.." NLM
locking calls on v3 mounts fail. And for "sec=krb5" NLM calls it
also leads to out-of-bounds reference while in check_nfsd_access().
This patch series address 3 problems.
The first patch addresses a problem related to a TLS export
policy. NLM call dont come over TLS and thus dont pass the
TLS checks in check_nfsd_access() leading to access being
denied. Instead rely on may_bypass_gss to indicate NLM and
allow access checking to continue.
The other 2 patches are for problems related to sec=krb5.
The 2nd patch is because previously for NLM check_nfsd_access()
was never called and thus nfsd4_spo_must_allow() function wasn't
called. After the patch, this lead to NLM call which has no
compound state structure created trying to dereference it.
This patch instead moves the call to after may_bypass_gss
check which implies NLM and would return there and would
never get to calling nfsd4_spo_must_allow().
The last patch is fixing what "access" content is being passed
into the inode_permission(). Prior to 4cc9b9f2bf4df, the code would
explicitly set access to be read/ownership. And after is passes
access that's set in nlm_fopen but it's lacking read access.
Olga Kornievskaia (3):
nfsd: fix access checking for NLM under XPRTSEC policies
nfsd: adjust nfsd4_spo_must_allow checking order
nfsd: reset access mask for NLM calls in nfsd_permission
fs/nfsd/export.c | 20 ++++++++++----------
fs/nfsd/vfs.c | 7 +++++++
2 files changed, 17 insertions(+), 10 deletions(-)
--
2.47.1
next reply other threads:[~2025-03-22 0:13 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-22 0:13 Olga Kornievskaia [this message]
2025-03-22 0:13 ` [PATCH 1/3] nfsd: fix access checking for NLM under XPRTSEC policies Olga Kornievskaia
2025-04-07 19:44 ` Jeff Layton
2025-03-22 0:13 ` [PATCH 2/3] nfsd: adjust nfsd4_spo_must_allow checking order Olga Kornievskaia
2025-04-07 15:36 ` Jeff Layton
2025-04-07 15:56 ` Olga Kornievskaia
2025-04-07 15:59 ` Jeff Layton
2025-04-07 17:17 ` Olga Kornievskaia
2025-04-07 17:47 ` Jeff Layton
2025-04-07 18:02 ` Olga Kornievskaia
2025-03-22 0:13 ` [PATCH 3/3] nfsd: reset access mask for NLM calls in nfsd_permission Olga Kornievskaia
2025-03-27 23:54 ` NeilBrown
2025-03-28 0:36 ` Olga Kornievskaia
2025-03-28 1:43 ` NeilBrown
2025-03-28 12:43 ` Chuck Lever
2025-03-28 15:13 ` Olga Kornievskaia
2025-03-28 21:53 ` NeilBrown
2025-03-28 23:29 ` Tom Talpey
2025-03-30 16:17 ` Chuck Lever
2025-03-30 16:12 ` Olga Kornievskaia
2025-03-31 0:10 ` NeilBrown
2025-03-31 14:49 ` Chuck Lever
2025-03-31 18:24 ` Olga Kornievskaia
2025-04-01 22:24 ` NeilBrown
2025-04-01 22:57 ` Olga Kornievskaia
2025-04-01 23:18 ` NeilBrown
2025-04-07 15:57 ` Jeff Layton
2025-04-08 20:40 ` Benjamin Coddington
2025-03-22 15:08 ` [PATCH 0/3] access checking fixes for NLM under security policies cel
2025-03-28 0:07 ` NeilBrown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250322001306.41666-1-okorniev@redhat.com \
--to=okorniev@redhat.com \
--cc=Dai.Ngo@oracle.com \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox