]> git.ipfire.org Git - thirdparty/linux.git/commit
ksmbd: reject empty-attribute synchronize-only create
authorNamjae Jeon <linkinjeon@kernel.org>
Sun, 21 Jun 2026 10:44:40 +0000 (19:44 +0900)
committerSteve French <stfrench@microsoft.com>
Tue, 23 Jun 2026 01:15:05 +0000 (20:15 -0500)
commit4687da7b28cff019a61d802afac44e2bf92edb98
tree43218d9ca0306fde680ccb09e4096da961eab725
parent19043971c947d307c9fc76e8b5e750ce7140b486
ksmbd: reject empty-attribute synchronize-only create

smb2.create.gentest checks each desired access bit independently and
expects an open that requests only SYNCHRONIZE with CreateDisposition
OPEN_IF and FileAttributes 0 to fail with STATUS_ACCESS_DENIED.

Rejecting all SYNCHRONIZE-only opens is too broad: SYNCHRONIZE does not
imply read, write, or delete data access, and
smb2.sharemode.sharemode-access expects a SYNCHRONIZE-only open to succeed
when it does not conflict with the existing share mode.

Limit the rejection to the gentest create shape: SYNCHRONIZE-only access,
OPEN_IF disposition, and no file attributes. Other synchronize-only opens
are handled by the normal permission and share-mode checks.

Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/smb2pdu.c