CVE-2022-49788
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
01/05/2025
Last modified:
02/05/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
misc/vmw_vmci: fix an infoleak in vmci_host_do_receive_datagram()<br />
<br />
`struct vmci_event_qp` allocated by qp_notify_peer() contains padding,<br />
which may carry uninitialized data to the userspace, as observed by<br />
KMSAN:<br />
<br />
BUG: KMSAN: kernel-infoleak in instrument_copy_to_user ./include/linux/instrumented.h:121<br />
instrument_copy_to_user ./include/linux/instrumented.h:121<br />
_copy_to_user+0x5f/0xb0 lib/usercopy.c:33<br />
copy_to_user ./include/linux/uaccess.h:169<br />
vmci_host_do_receive_datagram drivers/misc/vmw_vmci/vmci_host.c:431<br />
vmci_host_unlocked_ioctl+0x33d/0x43d0 drivers/misc/vmw_vmci/vmci_host.c:925<br />
vfs_ioctl fs/ioctl.c:51<br />
...<br />
<br />
Uninit was stored to memory at:<br />
kmemdup+0x74/0xb0 mm/util.c:131<br />
dg_dispatch_as_host drivers/misc/vmw_vmci/vmci_datagram.c:271<br />
vmci_datagram_dispatch+0x4f8/0xfc0 drivers/misc/vmw_vmci/vmci_datagram.c:339<br />
qp_notify_peer+0x19a/0x290 drivers/misc/vmw_vmci/vmci_queue_pair.c:1479<br />
qp_broker_attach drivers/misc/vmw_vmci/vmci_queue_pair.c:1662<br />
qp_broker_alloc+0x2977/0x2f30 drivers/misc/vmw_vmci/vmci_queue_pair.c:1750<br />
vmci_qp_broker_alloc+0x96/0xd0 drivers/misc/vmw_vmci/vmci_queue_pair.c:1940<br />
vmci_host_do_alloc_queuepair drivers/misc/vmw_vmci/vmci_host.c:488<br />
vmci_host_unlocked_ioctl+0x24fd/0x43d0 drivers/misc/vmw_vmci/vmci_host.c:927<br />
...<br />
<br />
Local variable ev created at:<br />
qp_notify_peer+0x54/0x290 drivers/misc/vmw_vmci/vmci_queue_pair.c:1456<br />
qp_broker_attach drivers/misc/vmw_vmci/vmci_queue_pair.c:1662<br />
qp_broker_alloc+0x2977/0x2f30 drivers/misc/vmw_vmci/vmci_queue_pair.c:1750<br />
<br />
Bytes 28-31 of 48 are uninitialized<br />
Memory access of size 48 starts at ffff888035155e00<br />
Data copied to user address 0000000020000100<br />
<br />
Use memset() to prevent the infoleaks.<br />
<br />
Also speculatively fix qp_notify_peer_local(), which may suffer from the<br />
same problem.
Impact
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/5a275528025ae4bc7e2232866856dfebf84b2fad
- https://git.kernel.org/stable/c/62634b43d3c4e1bf62fd540196f7081bf0885c0a
- https://git.kernel.org/stable/c/76c50d77b928a33e5290aaa9fdc10e88254ff8c7
- https://git.kernel.org/stable/c/7ccf7229b96fadc3a185d1391f814a604c7ef609
- https://git.kernel.org/stable/c/8e2f33c598370bcf828bab4d667d1d38bcd3c57d
- https://git.kernel.org/stable/c/e5b0d06d9b10f5f43101bd6598b076c347f9295f
- https://git.kernel.org/stable/c/e7061dd1fef2dfb6458cd521aef27aa66f510d31
- https://git.kernel.org/stable/c/f04586c2315cfd03d72ad0395705435e7ed07b1a