]> git.hungrycats.org Git - linux/commit
ksmbd: fix potencial out-of-bounds when buffer offset is invalid
authorNamjae Jeon <linkinjeon@kernel.org>
Mon, 18 Mar 2024 23:40:48 +0000 (08:40 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Nov 2024 14:37:33 +0000 (15:37 +0100)
commitad6480c9a5d884e2704adc51d69895d93339176c
treeb5ccbe3e6956627ffe3217ff59d03a46c4962fd3
parentd70c2e0904ab3715c5673fd45788a464a246d1db
ksmbd: fix potencial out-of-bounds when buffer offset is invalid

commit c6cd2e8d2d9aa7ee35b1fa6a668e32a22a9753da upstream.

I found potencial out-of-bounds when buffer offset fields of a few requests
is invalid. This patch set the minimum value of buffer offset field to
->Buffer offset to validate buffer length.

Cc: stable@vger.kernel.org
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Vamsi Krishna Brahmajosyula <vamsi-krishna.brahmajosyula@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/smb/server/smb2misc.c
fs/smb/server/smb2pdu.c