Star64_linux/net/vmw_vsock
Artem Chernyshev 1fe248b4b5 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-04-19 17:57:32 +08:00
..
af_vsock.c vsock: fix possible infinite sleep in vsock_connectible_wait_data() 2023-04-19 17:55:59 +08:00
af_vsock_tap.c
diag.c
hyperv_transport.c
Kconfig
Makefile
virtio_transport.c vsock/virtio: enable VQs early on probe 2023-04-19 17:47:13 +08:00
virtio_transport_common.c vhost/vsock: Use kvmalloc/kvfree for larger packets. 2023-04-19 17:55:13 +08:00
vmci_transport.c net: vmw_vsock: vmci: Check memcpy_from_msg() 2023-04-19 17:57:32 +08:00
vmci_transport.h
vmci_transport_notify.c
vmci_transport_notify.h
vmci_transport_notify_qstate.c
vsock_addr.c
vsock_loopback.c