]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ksmbd: validate SMB2 lease create contexts
authorNamjae Jeon <linkinjeon@kernel.org>
Thu, 18 Jun 2026 01:32:44 +0000 (10:32 +0900)
committerSteve French <stfrench@microsoft.com>
Tue, 23 Jun 2026 01:15:03 +0000 (20:15 -0500)
commitb69be2c58615950ee7353b61a21acdf8508c0cbb
tree760cf65e8ff348684d1b2b0e678c96c8cf14ca5e
parent37ee476071bcbf4fa97a5a7b208b3a51073b4fcc
ksmbd: validate SMB2 lease create contexts

Validate SMB2 lease context lengths, requested lease state bits, and v2
flags before using the context. Return errors via ERR_PTR so CREATE can
distinguish a missing lease context from a malformed one.

Also ignore lease v2 contexts for SMB 2.1, where they are not valid.

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