linux-stable/net/vmw_vsock
Artem Chernyshev 1afe89a96d net: vmw_vsock: vmci: Check memcpy_from_msg()
[ Upstream commit 44aa5a6dba ]

vmci_transport_dgram_enqueue() does not check the return value
of memcpy_from_msg().  If memcpy_from_msg() fails, it is possible that
uninitialized memory contents are sent unintentionally instead of user's
message in the datagram to the destination.  Return with an error if
memcpy_from_msg() fails.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 0f7db23a07 ("vmci_transport: switch ->enqeue_dgram, ->enqueue_stream and ->dequeue_stream to msghdr")
Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Vishnu Dasa <vdasa@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-07 12:07:21 +01:00
..
Kconfig VSOCK: Add Makefile and Kconfig 2016-08-02 02:57:30 +03:00
Makefile VSOCK: Add Makefile and Kconfig 2016-08-02 02:57:30 +03:00
af_vsock.c vsock: Fix memory leak in vsock_connect() 2022-08-25 11:09:29 +02:00
virtio_transport.c vsock/virtio: stop workers during the .remove() 2020-10-14 09:48:11 +02:00
virtio_transport_common.c vsock/virtio: update credit only if socket is not closed 2021-02-23 13:59:16 +01:00
vmci_transport.c net: vmw_vsock: vmci: Check memcpy_from_msg() 2023-01-07 12:07:21 +01:00
vmci_transport.h VSOCK: constify vmci_transport_notify_ops structures 2015-11-23 15:49:29 -05:00
vmci_transport_notify.c VSOCK: constify vmci_transport_notify_ops structures 2015-11-23 15:49:29 -05:00
vmci_transport_notify.h VSOCK: constify vmci_transport_notify_ops structures 2015-11-23 15:49:29 -05:00
vmci_transport_notify_qstate.c VSOCK: constify vmci_transport_notify_ops structures 2015-11-23 15:49:29 -05:00
vsock_addr.c VSOCK: Move af_vsock.h and vsock_addr.h to include/net 2013-07-27 22:14:06 -07:00