ksmbd: validate mech token in session setup
authorNamjae Jeon <linkinjeon@kernel.org>
Sat, 13 Jan 2024 06:11:41 +0000 (15:11 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:44 +0000 (15:35 -0800)
commita2b21ef1ea4cf632d19b3a7cc4d4245b8e63202a
treef4fdc788939d7b04c70ef7fa8edbca32fe865a8c
parent3b2291360cced730dde45e93faaa8232f10a6ae4
ksmbd: validate mech token in session setup

commit 92e470163d96df8db6c4fa0f484e4a229edb903d upstream.

If client send invalid mech token in session setup request, ksmbd
validate and make the error if it is invalid.

Cc: stable@vger.kernel.org
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-22890
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/smb/server/asn1.c
fs/smb/server/connection.h
fs/smb/server/smb2pdu.c