public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] NFSD: NFSv4 file creation neglects setting ACL" failed to apply to 6.6-stable tree
@ 2025-12-29 14:31 gregkh
  2026-01-08 19:09 ` [PATCH 6.6.y v2 0/4] NFSD: NFSv4 file creation neglects setting ACL Chuck Lever
                   ` (9 more replies)
  0 siblings, 10 replies; 15+ messages in thread
From: gregkh @ 2025-12-29 14:31 UTC (permalink / raw)
  To: chuck.lever, aurelien.couderc2002, roland.mainz; +Cc: stable


The patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x 913f7cf77bf14c13cfea70e89bcb6d0b22239562
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2025122941-civic-revered-b250@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..

Possible dependencies:



thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 913f7cf77bf14c13cfea70e89bcb6d0b22239562 Mon Sep 17 00:00:00 2001
From: Chuck Lever <chuck.lever@oracle.com>
Date: Tue, 18 Nov 2025 19:51:19 -0500
Subject: [PATCH] NFSD: NFSv4 file creation neglects setting ACL
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

An NFSv4 client that sets an ACL with a named principal during file
creation retrieves the ACL afterwards, and finds that it is only a
default ACL (based on the mode bits) and not the ACL that was
requested during file creation. This violates RFC 8881 section
6.4.1.3: "the ACL attribute is set as given".

The issue occurs in nfsd_create_setattr(), which calls
nfsd_attrs_valid() to determine whether to call nfsd_setattr().
However, nfsd_attrs_valid() checks only for iattr changes and
security labels, but not POSIX ACLs. When only an ACL is present,
the function returns false, nfsd_setattr() is skipped, and the
POSIX ACL is never applied to the inode.

Subsequently, when the client retrieves the ACL, the server finds
no POSIX ACL on the inode and returns one generated from the file's
mode bits rather than returning the originally-specified ACL.

Reported-by: Aurélien Couderc <aurelien.couderc2002@gmail.com>
Fixes: c0cbe70742f4 ("NFSD: add posix ACLs to struct nfsd_attrs")
Cc: Roland Mainz <roland.mainz@nrubsig.org>
Cc: stable@vger.kernel.org
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

diff --git a/fs/nfsd/vfs.h b/fs/nfsd/vfs.h
index fa46f8b5f132..1dd3ae3ceb3a 100644
--- a/fs/nfsd/vfs.h
+++ b/fs/nfsd/vfs.h
@@ -67,7 +67,8 @@ static inline bool nfsd_attrs_valid(struct nfsd_attrs *attrs)
 	struct iattr *iap = attrs->na_iattr;
 
 	return (iap->ia_valid || (attrs->na_seclabel &&
-		attrs->na_seclabel->len));
+		attrs->na_seclabel->len) ||
+		attrs->na_pacl || attrs->na_dpacl);
 }
 
 __be32		nfserrno (int errno);


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

end of thread, other threads:[~2026-01-12 11:08 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-29 14:31 FAILED: patch "[PATCH] NFSD: NFSv4 file creation neglects setting ACL" failed to apply to 6.6-stable tree gregkh
2026-01-08 19:09 ` [PATCH 6.6.y v2 0/4] NFSD: NFSv4 file creation neglects setting ACL Chuck Lever
2026-01-08 19:09 ` [PATCH 6.6.y v2 1/4] nfsd: convert to new timestamp accessors Chuck Lever
2026-01-08 20:04   ` Chuck Lever
2026-01-09  9:55   ` Greg Kroah-Hartman
2026-01-09 14:09     ` Chuck Lever
2026-01-08 19:10 ` [PATCH 6.6.y v2 2/4] nfsd: Fix NFSv3 atomicity bugs in nfsd_setattr() Chuck Lever
2026-01-08 19:10 ` [PATCH 6.6.y v2 3/4] nfsd: set security label during create operations Chuck Lever
2026-01-08 19:10 ` [PATCH 6.6.y v2 4/4] NFSD: NFSv4 file creation neglects setting ACL Chuck Lever
2026-01-09 14:39 ` [PATCH 6.6.y v3 0/4] " Chuck Lever
2026-01-12 11:08   ` Greg Kroah-Hartman
2026-01-09 14:39 ` [PATCH 6.6.y v3 1/4] nfsd: convert to new timestamp accessors Chuck Lever
2026-01-09 14:39 ` [PATCH 6.6.y v3 2/4] nfsd: Fix NFSv3 atomicity bugs in nfsd_setattr() Chuck Lever
2026-01-09 14:39 ` [PATCH 6.6.y v3 3/4] nfsd: set security label during create operations Chuck Lever
2026-01-09 14:39 ` [PATCH 6.6.y v3 4/4] NFSD: NFSv4 file creation neglects setting ACL Chuck Lever

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox