summaryrefslogtreecommitdiff
path: root/fs/smb/server/vfs.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-07-24 19:50:05 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-07-24 19:50:05 -0700
commit8e371eff3f72afde801c36007fa15fc7dd5314f3 (patch)
tree88d7ab17996ba49b81e65fd4d4db1c6316572c9d /fs/smb/server/vfs.c
parentae453eef925945a02bb558bff9debbee352e33e9 (diff)
parent5e1b924808568e89c5cb132ecebe1824bd91af0c (diff)
downloadlinux-8e371eff3f72afde801c36007fa15fc7dd5314f3.tar.gz
linux-8e371eff3f72afde801c36007fa15fc7dd5314f3.tar.bz2
linux-8e371eff3f72afde801c36007fa15fc7dd5314f3.zip
Merge tag 'v7.2-rc4-smb3-server-fixes' of git://git.samba.org/ksmbd
Pull smb server fixes from Steve French: "This contains eight ksmbd fixes covering POSIX ACL handling, SMB signing enforcement, DACL parsing and construction hardening, session lifetime handling, and validation of malformed transform and compressed SMB2 requests: - preserve inherited POSIX ACL mask when creating objects. - enforce the session signing requirement for plaintext SMB requests. - harden DACL/ACE processing against size overflows, incomplete ACE copies, and undersized SIDs. - defer teardown of a previous session until NTLM authentication succeeds. - reject undersized encryption-transform and decompressed SMB2 requests before they can reach normal SMB2 request processing" * tag 'v7.2-rc4-smb3-server-fixes' of git://git.samba.org/ksmbd: ksmbd: reject undersized decompressed SMB2 requests ksmbd: validate minimum PDU size for transform requests ksmbd: defer destroy_previous_session() until after NTLM authentication ksmbd: validate ACE size against SID sub-authorities ksmbd: restore DACL size on check_add_overflow() to avoid malformed ACL ksmbd: bound DACL dedup walk to copied ACEs ksmbd: enforce signing required by the session ksmbd: preserve VFS inherited POSIX ACL mask
Diffstat (limited to 'fs/smb/server/vfs.c')
-rw-r--r--fs/smb/server/vfs.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/fs/smb/server/vfs.c b/fs/smb/server/vfs.c
index d0a0ad15d803..d324585c0566 100644
--- a/fs/smb/server/vfs.c
+++ b/fs/smb/server/vfs.c
@@ -1886,10 +1886,6 @@ int ksmbd_vfs_inherit_posix_acl(struct mnt_idmap *idmap,
const struct path *path, struct inode *parent_inode)
{
struct posix_acl *acls;
- struct posix_acl_entry *pace;
- struct dentry *dentry = path->dentry;
- struct inode *inode = d_inode(dentry);
- int rc, i;
if (!IS_ENABLED(CONFIG_FS_POSIX_ACL))
return -EOPNOTSUPP;
@@ -1897,29 +1893,9 @@ int ksmbd_vfs_inherit_posix_acl(struct mnt_idmap *idmap,
acls = get_inode_acl(parent_inode, ACL_TYPE_DEFAULT);
if (IS_ERR_OR_NULL(acls))
return -ENOENT;
- pace = acls->a_entries;
-
- for (i = 0; i < acls->a_count; i++, pace++) {
- if (pace->e_tag == ACL_MASK) {
- pace->e_perm = 0x07;
- break;
- }
- }
-
- rc = set_posix_acl(idmap, dentry, ACL_TYPE_ACCESS, acls);
- if (rc < 0)
- ksmbd_debug(SMB, "Set posix acl(ACL_TYPE_ACCESS) failed, rc : %d\n",
- rc);
- if (S_ISDIR(inode->i_mode)) {
- rc = set_posix_acl(idmap, dentry, ACL_TYPE_DEFAULT,
- acls);
- if (rc < 0)
- ksmbd_debug(SMB, "Set posix acl(ACL_TYPE_DEFAULT) failed, rc : %d\n",
- rc);
- }
posix_acl_release(acls);
- return rc;
+ return 0;
}
void ksmbd_vfs_update_compressed_fattr(struct dentry *dentry, __le32 *fattr)