]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
smb: client: mask server-provided mode to 07777 in modefromsid
authorNorbert Manthey <nmanthey@amazon.de>
Thu, 9 Jul 2026 15:54:39 +0000 (15:54 +0000)
committerSteve French <stfrench@microsoft.com>
Thu, 9 Jul 2026 17:25:16 +0000 (12:25 -0500)
commite3d9c7160d483fc8f9e225aafad8ecbbc43f3151
tree85a1c4c63665372f447f74e1fa67288cd33dcbab
parent179e3ee9856d2b5f0ccf2f24e2334bbe76efefa9
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.

Fixes: e2f8fbfb8d09c ("cifs: get mode bits from special sid on stat")
Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
Assisted-by: Kiro:claude-opus-4.6
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifsacl.c