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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Jan 2024 10:51:46 +0000 (11:51 +0100)
commitc5e0ed716c52fddea5e625668e75658c3b81d3fc
tree9b526dc4919f418e55cdd92a60733561c98aaa90
parent00e66f948abef3b092598f4f885ecf2fe7b54090
smb: client: fix potential OOB in smb2_dump_detail()

[ Upstream commit 567320c46a60a3c39b69aa1df802d753817a3f86 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/smb/client/smb2misc.c
fs/smb/client/smb2ops.c