David Disseldorp e7067a4462 ksmbd: avoid out of bounds access in decode_preauth_ctxt()
Confirm that the accessed pneg_ctxt->HashAlgorithms address sits within
the SMB request boundary; deassemble_neg_contexts() only checks that the
eight byte smb2_neg_context header + (client controlled) DataLength are
within the packet boundary, which is insufficient.

Checking for sizeof(struct smb2_preauth_neg_context) is overkill given
that the type currently assumes SMB311_SALT_SIZE bytes of trailing Salt.

Signed-off-by: David Disseldorp <ddiss@suse.de>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2023-04-13 14:17:32 -05:00
..
2023-01-30 20:49:30 -06:00
2021-06-28 16:28:31 +09:00
2021-06-28 16:28:31 +09:00
2023-02-20 11:53:11 -08:00
2021-06-28 16:28:31 +09:00
2022-04-14 20:56:13 -05:00
2023-01-20 15:27:48 -06:00
2021-06-28 16:28:31 +09:00
2021-06-28 16:28:31 +09:00
2021-06-28 16:28:31 +09:00