]> exis.tech > repos - linux.git/commit
ksmbd: use opener credentials for FSCTL mutations
authorNamjae Jeon <linkinjeon@kernel.org>
Sat, 13 Jun 2026 13:00:04 +0000 (22:00 +0900)
committerSteve French <stfrench@microsoft.com>
Tue, 16 Jun 2026 23:57:22 +0000 (18:57 -0500)
commitc6394bcaf254c5baf9aff43376020be5db6d3316
treec3d804c070c38454ad61b479fa486e79d36b3134
parentbaa5e094886fffa7e6272edcb5e08be5ce28262c
ksmbd: use opener credentials for FSCTL mutations

SET_SPARSE, SET_ZERO_DATA and SET_COMPRESSION operate on an open SMB
handle but call VFS xattr, fallocate or fileattr helpers with the current
ksmbd worker credentials. Those helpers can revalidate inode permissions,
ownership and LSM policy independently of the SMB handle access mask.

Run each operation with the credentials captured in the target file when
the handle was opened. Keep credential handling local to these single-file
FSCTLs rather than applying session credentials to the complete IOCTL
handler, which also contains handle-less and multi-handle operations.

Cc: stable@vger.kernel.org
Reported-by: Musaab Khan <musaab.khan@protonmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/smb2pdu.c
fs/smb/server/vfs.c