smb: client: fix potential OOB in smb2_dump_detail()
authorPaulo Alcantara <pc@manguebit.com>
Tue, 19 Dec 2023 16:10:31 +0000 (13:10 -0300)
committerSteve French <stfrench@microsoft.com>
Tue, 19 Dec 2023 16:33:39 +0000 (10:33 -0600)
commit567320c46a60a3c39b69aa1df802d753817a3f86
treeaea427c1c51710ed236d6e5a1f51005847dce766
parentb50492b05fd02887b46aef079592207fb5c97a4c
smb: client: fix potential OOB in smb2_dump_detail()

Validate SMB message with ->check_message() before calling
->calc_smb_size().

This fixes CVE-2023-6610.

Reported-by: j51569436@gmail.com
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218219
Cc; stable@vger.kernel.org
Signed-off-by: Paulo Alcantara <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smb2misc.c
fs/smb/client/smb2ops.c