smb: client: fix potential OOB in cifs_dump_detail()
authorPaulo Alcantara <pc@manguebit.com>
Sat, 16 Dec 2023 04:10:04 +0000 (01:10 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Jan 2024 12:42:43 +0000 (12:42 +0000)
commit6630441cc2e8f1f132636c992d65afbe269f3ad7
tree10b833f041c1f6a6f6fc714150a4f62ed6b48eee
parentc0e98de95072f5462c475dcc1ae44ed9f500b2cb
smb: client: fix potential OOB in cifs_dump_detail()

commit b50492b05fd02887b46aef079592207fb5c97a4c upstream.

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

Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/smb/client/cifs_debug.c