Commit e5f5248
committed
net: vmw_vsock: vmci: Check memcpy_from_msg()
Bugzilla: https://bugzilla.redhat.com/2160028
commit 44aa5a6
Author: Artem Chernyshev <artem.chernyshev@red-soft.ru>
Date: Tue Dec 6 09:58:34 2022 +0300
net: vmw_vsock: vmci: Check memcpy_from_msg()
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: 0f7db23 ("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: Stefano Garzarella <sgarzare@redhat.com>1 parent 898e9af commit e5f5248
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1711 | 1711 | | |
1712 | 1712 | | |
1713 | 1713 | | |
1714 | | - | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
1715 | 1719 | | |
1716 | 1720 | | |
1717 | 1721 | | |
| |||
0 commit comments