Linux NFS development
 help / color / mirror / Atom feed
From: Dominik Maier <dmnk@google.com>
To: Chuck Lever <cel@kernel.org>, Jeff Layton <jlayton@kernel.org>
Cc: NeilBrown <neil@brown.name>,
	Olga Kornievskaia <okorniev@redhat.com>,
	Dai Ngo <Dai.Ngo@oracle.com>,  Tom Talpey <tom@talpey.com>,
	linux-nfs@vger.kernel.org, dmnk+artist@google.com
Subject: [PATCH v3 0/2] nfsd: enforce search permission on directory delegations
Date: Mon, 30 Nov 2026 17:04:17 +0100	[thread overview]
Message-ID: <20261130160419.2644777-1-dmnk@google.com> (raw)

Clients can currently acquire NFSv4.1 directory delegations on
directories they can read but not search, receiving child filehandles in
CB_NOTIFY despite LOOKUP failing with NFS4ERR_ACCESS.

Patch 1 declines directory delegations with GDD4_UNAVAIL on access
denial so compound PUTFH + GET_DIR_DELEGATION + GETATTR requests on mode
0711 directories continue to succeed, while surfacing non-directory and
stale-filehandle errors directly. Patch 2 enforces search permission and
limits the owner permission override to regular files.

Changes in v3:
- Only map nfserr_acces to GDD4_UNAVAIL in patch 1/2 (Chuck Lever).
- Add Jeff Layton's Reviewed-by on patch 1/2.
- v2: https://lore.kernel.org/linux-nfs/20261124180606.73719-1-dmnk@google.com/

Found with an AI-assisted code review tool (ARTIST) and verified in
QEMU/KVM over NFSv4.1 across 0711, 0744, 0400, regular files, and stale
filehandles.

Dominik Maier (2):
  nfsd: return GDD4_UNAVAIL on nfserr_acces in
    nfsd4_get_dir_delegation()
  nfsd: require NFSD_MAY_EXEC when acquiring directory delegations

 fs/nfsd/filecache.c | 10 ++++++----
 fs/nfsd/nfs4proc.c  |  4 ++++
 2 files changed, 10 insertions(+), 4 deletions(-)


base-commit: 6104bc60edc0d9c6bbc509ec9df4b8c26b1d31a3
-- 
2.56.1.911.g883d8bcb20-goog


             reply	other threads:[~2026-11-30 16:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 16:04 Dominik Maier [this message]
2026-11-30 16:04 ` [PATCH v3 1/2] nfsd: return GDD4_UNAVAIL on nfserr_acces in nfsd4_get_dir_delegation() Dominik Maier
2026-11-30 16:04 ` [PATCH v3 2/2] nfsd: require NFSD_MAY_EXEC when acquiring directory delegations Dominik Maier

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=20261130160419.2644777-1-dmnk@google.com \
    --to=dmnk@google.com \
    --cc=Dai.Ngo@oracle.com \
    --cc=cel@kernel.org \
    --cc=dmnk+artist@google.com \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neil@brown.name \
    --cc=okorniev@redhat.com \
    --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