]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: smbdirect: validate data_offset and data_length field of smb_direct_data_transfer
authorNamjae Jeon <linkinjeon@kernel.org>
Wed, 10 Sep 2025 02:22:52 +0000 (11:22 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Sep 2025 08:58:52 +0000 (10:58 +0200)
commitbdaab5c6538e250a9654127e688ecbbeb6f771d5
treebbb8ebfc1272f1de324a8bb94c3b29947d199e0a
parent2786879aebf363806a13d41e8d5f99202ddd23d9
ksmbd: smbdirect: validate data_offset and data_length field of smb_direct_data_transfer

commit 5282491fc49d5614ac6ddcd012e5743eecb6a67c upstream.

If data_offset and data_length of smb_direct_data_transfer struct are
invalid, out of bounds issue could happen.
This patch validate data_offset and data_length field in recv_done.

Cc: stable@vger.kernel.org
Fixes: 2ea086e35c3d ("ksmbd: add buffer validation for smb direct")
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reported-by: Luigino Camastra, Aisle Research <luigino.camastra@aisle.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/smb/server/transport_rdma.c