FAILED: patch "[PATCH] smb: client: mask server-provided mode to 07777 in" failed to apply to 5.15-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 5.15-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-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x e3d9c7160d483fc8f9e225aafad8ecbbc43f3151
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026071454-wolf-talcum-3f10@gregkh' --subject-prefix 'PATCH 5.15.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From e3d9c7160d483fc8f9e225aafad8ecbbc43f3151 Mon Sep 17 00:00:00 2001
From: Norbert Manthey <[email protected]>
Date: Thu, 9 Jul 2026 15:54:39 +0000
Subject: [PATCH] smb: client: mask server-provided mode to 07777 in
modefromsid
When modefromsid is active, parse_dacl() applies the server-provided sub_auth[2] value from the NFS mode SID to cf_mode without masking to 07777. Apply the correct masking, same as in the read path.
fs/smb/client/cifsacl.c +1 -1
@@ -962,7 +962,7 @@ static void parse_dacl(struct smb_acl *pdacl, char *end_of_acl,*/ fattr->cf_mode &= ~07777 ; fattr->cf_mode |= -le32_to_cpu (ppace[i]->sid.sub_auth[2 ]); +le32_to_cpu (ppace[i]->sid.sub_auth[2 ]) &07777 ;break ; }else {if (compare_sids (&(ppace[i]->sid), pownersid) ==0 ) {
Sasha Levin
maintainerPATCH 1/1 smb: client: mask server-provided mode to 07777 in modefromsid
From: Norbert Manthey <[email protected]>
[ Upstream commit e3d9c7160d483fc8f9e225aafad8ecbbc43f3151 ]
When modefromsid is active, parse_dacl() applies the server-provided sub_auth[2] value from the NFS mode SID to cf_mode without masking to 07777. Apply the correct masking, same as in the read path.
--- fs/cifs/cifsacl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/cifsacl.c +1 -1
@@ -887,7 +887,7 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl,*/ fattr->cf_mode &= ~07777 ; fattr->cf_mode |= -le32_to_cpu (ppace[i]->sid.sub_auth[2 ]); +le32_to_cpu (ppace[i]->sid.sub_auth[2 ]) &07777 ;break ; }else {if (compare_sids (&(ppace[i]->sid), pownersid) ==0 ) {
Signature · 1 line
2.53.0