]> git.baikalelectronics.ru Git - kernel.git/commit
ksmbd: check protocol id in ksmbd_verify_smb_message()
authorNamjae Jeon <linkinjeon@kernel.org>
Wed, 22 Sep 2021 12:00:57 +0000 (21:00 +0900)
committerSteve French <stfrench@microsoft.com>
Wed, 22 Sep 2021 22:21:05 +0000 (17:21 -0500)
commit346d9b971f7169d0a5e088860a7f640e4679c4c9
tree4ec713a6049d0090903a0ae37bfe4547d9fc7dc3
parentceb55c76533a5a347fd132c2ebdfd146891d5852
ksmbd: check protocol id in ksmbd_verify_smb_message()

When second smb2 pdu has invalid protocol id, ksmbd doesn't detect it
and allow to process smb2 request. This patch add the check it in
ksmbd_verify_smb_message() and don't use protocol id of smb2 request as
protocol id of response.

Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reported-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/smb2pdu.c
fs/ksmbd/smb_common.c
fs/ksmbd/smb_common.h