]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
VMCI: Fix possible memcpy() run-time warning in vmci_datagram_invoke_guest_handler()
authorVasiliy Kovalev <kovalev@altlinux.org>
Mon, 19 Feb 2024 10:53:15 +0000 (13:53 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Apr 2024 11:07:41 +0000 (13:07 +0200)
commit91fb03cea0d598f729cc1780d3bd3705d47a514d
tree2e4a74d02a272f6b9e8d2c871017fde8023a7157
parentb456cb98cbad58c8a6ad85acc93458903b7c5f5f
VMCI: Fix possible memcpy() run-time warning in vmci_datagram_invoke_guest_handler()

commit e606e4b71798cc1df20e987dde2468e9527bd376 upstream.

The changes are similar to those given in the commit 19b070fefd0d
("VMCI: Fix memcpy() run-time warning in dg_dispatch_as_host()").

Fix filling of the msg and msg_payload in dg_info struct, which prevents a
possible "detected field-spanning write" of memcpy warning that is issued
by the tracking mechanism __fortify_memcpy_chk.

Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org>
Link: https://lore.kernel.org/r/20240219105315.76955-1-kovalev@altlinux.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/vmw_vmci/vmci_datagram.c