linux-stable/net/vmw_vsock
Artem Chernyshev f54731a70c 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-18 11:41:13 +01:00
..
af_vsock.c vsock: Set socket state back to SS_UNCONNECTED in vsock_connect_timeout() 2022-08-25 11:18:25 +02:00
af_vsock_tap.c
diag.c
hyperv_transport.c vsock: fix locking in vsock_shutdown() 2021-02-17 10:35:19 +01:00
Kconfig
Makefile
virtio_transport.c vsock/virtio: avoid potential deadlock when vsock device remove 2021-08-18 08:57:01 +02:00
virtio_transport_common.c vhost/vsock: Use kvmalloc/kvfree for larger packets. 2022-10-26 13:22:25 +02:00
vmci_transport.c net: vmw_vsock: vmci: Check memcpy_from_msg() 2023-01-18 11:41:13 +01:00
vmci_transport.h
vmci_transport_notify.c
vmci_transport_notify.h
vmci_transport_notify_qstate.c
vsock_addr.c