diff options
| author | Norbert Manthey <nmanthey@amazon.de> | 2026-07-09 15:54:39 +0000 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2026-07-09 12:25:16 -0500 |
| commit | e3d9c7160d483fc8f9e225aafad8ecbbc43f3151 (patch) | |
| tree | 85a1c4c63665372f447f74e1fa67288cd33dcbab | |
| parent | 179e3ee9856d2b5f0ccf2f24e2334bbe76efefa9 (diff) | |
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>
| -rw-r--r-- | fs/smb/client/cifsacl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/smb/client/cifsacl.c b/fs/smb/client/cifsacl.c index 07cf0e578233..9424281a7674 100644 --- a/fs/smb/client/cifsacl.c +++ b/fs/smb/client/cifsacl.c @@ -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) { |
