WSL2-Linux-Kernel/net/vmw_vsock
Artem Chernyshev c65603abc3 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>
2022-12-31 13:14:18 +01:00
..
Kconfig
Makefile
af_vsock.c vsock: fix possible infinite sleep in vsock_connectible_wait_data() 2022-11-10 18:15:31 +01:00
af_vsock_tap.c
diag.c
hyperv_transport.c Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer 2021-05-14 17:37:46 +00:00
virtio_transport.c vsock/virtio: enable VQs early on probe 2022-04-08 14:23:51 +02:00
virtio_transport_common.c vhost/vsock: Use kvmalloc/kvfree for larger packets. 2022-10-26 12:34:47 +02:00
vmci_transport.c net: vmw_vsock: vmci: Check memcpy_from_msg() 2022-12-31 13:14:18 +01:00
vmci_transport.h
vmci_transport_notify.c
vmci_transport_notify.h
vmci_transport_notify_qstate.c
vsock_addr.c vsock_addr: Check for supported flag values 2020-12-14 19:33:39 -08:00
vsock_loopback.c vsock/loopback: enable SEQPACKET for transport 2021-06-11 13:32:47 -07:00