summaryrefslogtreecommitdiff
path: root/fs/smb/server/compress.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/compress.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/compress.c')
-rw-r--r--fs/smb/server/compress.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/smb/server/compress.c b/fs/smb/server/compress.c
index f8cf515b9c30..95e48fa6b448 100644
--- a/fs/smb/server/compress.c
+++ b/fs/smb/server/compress.c
@@ -56,7 +56,8 @@ int ksmbd_decompress_request(struct ksmbd_conn *conn)
}
max_allowed_pdu_size = SMB3_MAX_MSGSIZE + conn->vals->max_write_size;
- if (out_size > max_allowed_pdu_size ||
+ if (out_size < sizeof(struct smb2_pdu) ||
+ out_size > max_allowed_pdu_size ||
out_size > MAX_STREAM_PROT_LEN)
return -EINVAL;