]> git.baikalelectronics.ru Git - kernel.git/commit
ksmbd: fix SMB 3.11 posix extension mount failure
authorNamjae Jeon <linkinjeon@kernel.org>
Sat, 22 Jan 2022 01:47:22 +0000 (10:47 +0900)
committerSteve French <stfrench@microsoft.com>
Mon, 24 Jan 2022 00:19:04 +0000 (18:19 -0600)
commit6acac3dc40909b44cced76ccaf0c6970a83760c6
treebeaa16deed33c4e48e66c7c0c0d93347bd865dc6
parent6e424e6bafec35e47db4b693fe41eff065b7dbf6
ksmbd: fix SMB 3.11 posix extension mount failure

cifs client set 4 to DataLength of create_posix context, which mean
Mode variable of create_posix context is only available. So buffer
validation of ksmbd should check only the size of Mode except for
the size of Reserved variable.

Fixes: 6ca34401b445 ("ksmbd: add buffer validation for SMB2_CREATE_CONTEXT")
Cc: stable@vger.kernel.org # v5.15+
Reported-by: Steve French <smfrench@gmail.com>
Tested-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/smb2pdu.c