FAILED: patch "[PATCH] ksmbd: keep group denials when a POSIX ACL entry decides" failed to apply to 6.1-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 6.1-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 <[email protected]>.
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.1.y
git checkout FETCH_HEAD
git cherry-pick -x b0af9a3e6b1534d353ca6ac23caaf46127f62e4a
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026112512-reoccur-blabber-7cec@gregkh' --subject-prefix 'PATCH 6.1.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From b0af9a3e6b1534d353ca6ac23caaf46127f62e4a Mon Sep 17 00:00:00 2001
From: Ian Bridges <[email protected]>
Date: Mon, 9 Nov 2026 20:33:44 -0600
Subject: [PATCH] ksmbd: keep group denials when a POSIX ACL entry decides
access
When no ACE names the caller, Everyone or Authenticated Users, smb_check_perm_dacl() lets a POSIX ACL entry for the caller decide access. The entry's rights replace the result of the DACL walk. Deny ACEs for the caller's groups, and OWNER RIGHTS for the owner, are then lost.
For example, a deny of FILE_WRITE_DATA for one of the caller's groups should refuse writes. A POSIX ACL entry that gives the caller write access still lets the caller write.
Remove the requested rights that those ACEs deny from the entry's rights. The DACL walk already records them in grp_denied.
fs/smb/server/smbacl.c +9 -0
@@ -1771,6 +1771,15 @@ int smb_check_perm_dacl(struct ksmbd_conn *conn, const struct path *path,if (!access_bits) access_bits =SET_MINIMUM_RIGHTS ; +/* +* Only ACEs for the caller's groups, +* or OWNER RIGHTS for the owner, apply +* here. The POSIX ACL entry does not +* grant an explicitly requested right +* that they deny first in DACL order. +*/ + access_bits &= ~(grp_denied & + requested);posix_acl_release (posix_acls); goto check_access_bits; }