ksmbd: fix out of bounds read in smb2_sess_setup
authorNamjae Jeon <linkinjeon@kernel.org>
Sat, 24 Jun 2023 03:33:09 +0000 (12:33 +0900)
committerSteve French <stfrench@microsoft.com>
Mon, 26 Jun 2023 05:07:04 +0000 (00:07 -0500)
commit98422bdd4cb3ca4d08844046f6507d7ec2c2b8d8
treef0e55e71c92a0691ab11c0a22e3568d8ae8f0398
parentf65fadb0422537d73f9a6472861852dc2f7a6a5b
ksmbd: fix out of bounds read in smb2_sess_setup

ksmbd does not consider the case of that smb2 session setup is
in compound request. If this is the second payload of the compound,
OOB read issue occurs while processing the first payload in
the smb2_sess_setup().

Cc: stable@vger.kernel.org
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-21355
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/smb2pdu.c