Skip to main content

CVE-2022-49788: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2022-49788cvecve-2022-49788
Published: Thu May 01 2025 (05/01/2025, 14:09:20 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: misc/vmw_vmci: fix an infoleak in vmci_host_do_receive_datagram() `struct vmci_event_qp` allocated by qp_notify_peer() contains padding, which may carry uninitialized data to the userspace, as observed by KMSAN: BUG: KMSAN: kernel-infoleak in instrument_copy_to_user ./include/linux/instrumented.h:121 instrument_copy_to_user ./include/linux/instrumented.h:121 _copy_to_user+0x5f/0xb0 lib/usercopy.c:33 copy_to_user ./include/linux/uaccess.h:169 vmci_host_do_receive_datagram drivers/misc/vmw_vmci/vmci_host.c:431 vmci_host_unlocked_ioctl+0x33d/0x43d0 drivers/misc/vmw_vmci/vmci_host.c:925 vfs_ioctl fs/ioctl.c:51 ... Uninit was stored to memory at: kmemdup+0x74/0xb0 mm/util.c:131 dg_dispatch_as_host drivers/misc/vmw_vmci/vmci_datagram.c:271 vmci_datagram_dispatch+0x4f8/0xfc0 drivers/misc/vmw_vmci/vmci_datagram.c:339 qp_notify_peer+0x19a/0x290 drivers/misc/vmw_vmci/vmci_queue_pair.c:1479 qp_broker_attach drivers/misc/vmw_vmci/vmci_queue_pair.c:1662 qp_broker_alloc+0x2977/0x2f30 drivers/misc/vmw_vmci/vmci_queue_pair.c:1750 vmci_qp_broker_alloc+0x96/0xd0 drivers/misc/vmw_vmci/vmci_queue_pair.c:1940 vmci_host_do_alloc_queuepair drivers/misc/vmw_vmci/vmci_host.c:488 vmci_host_unlocked_ioctl+0x24fd/0x43d0 drivers/misc/vmw_vmci/vmci_host.c:927 ... Local variable ev created at: qp_notify_peer+0x54/0x290 drivers/misc/vmw_vmci/vmci_queue_pair.c:1456 qp_broker_attach drivers/misc/vmw_vmci/vmci_queue_pair.c:1662 qp_broker_alloc+0x2977/0x2f30 drivers/misc/vmw_vmci/vmci_queue_pair.c:1750 Bytes 28-31 of 48 are uninitialized Memory access of size 48 starts at ffff888035155e00 Data copied to user address 0000000020000100 Use memset() to prevent the infoleaks. Also speculatively fix qp_notify_peer_local(), which may suffer from the same problem.

AI-Powered Analysis

AILast updated: 06/30/2025, 01:40:20 UTC

Technical Analysis

CVE-2022-49788 is an information leak vulnerability found in the Linux kernel's vmw_vmci driver, specifically within the vmci_host_do_receive_datagram() function. The vulnerability arises because the struct vmci_event_qp, allocated by the qp_notify_peer() function, contains padding bytes that are not properly initialized. This uninitialized memory can carry residual kernel data to userspace when copied, leading to an infoleak. The issue was detected by Kernel Memory Sanitizer (KMSAN), which flagged that uninitialized data was copied to user space via the copy_to_user() function. The root cause is that the local variable ev in qp_notify_peer() is not fully zeroed out before being copied, allowing bytes 28-31 of a 48-byte structure to leak potentially sensitive kernel memory contents. The vulnerability affects the vmw_vmci driver, which is used for communication between virtual machines and the host in VMware environments running Linux. The patch involves using memset() to clear the padding bytes to prevent leakage and a speculative fix to qp_notify_peer_local() which may have a similar issue. No known exploits are reported in the wild, and no CVSS score has been assigned yet. The vulnerability requires local access to the system and interaction with the vmw_vmci device interface to trigger the infoleak. While it does not directly allow code execution or privilege escalation, leaking kernel memory can aid attackers in bypassing security mechanisms such as KASLR (Kernel Address Space Layout Randomization) or gaining insights into kernel data structures for further exploitation.

Potential Impact

For European organizations, especially those using Linux systems in virtualized VMware environments, this vulnerability poses a moderate risk. The infoleak could allow a local attacker or malicious insider with access to the system to obtain sensitive kernel memory contents, potentially facilitating privilege escalation or other attacks by revealing kernel addresses or secrets. Organizations running Linux servers or desktops with VMware tools and vmw_vmci enabled are at risk. While the vulnerability does not directly cause denial of service or remote code execution, the leakage of kernel memory can undermine system integrity and confidentiality. This is particularly relevant for sectors with high security requirements such as finance, government, and critical infrastructure in Europe. The vulnerability's impact is limited by the need for local access and interaction with the vmw_vmci interface, reducing the attack surface to insiders or compromised accounts. However, given the widespread use of Linux in enterprise and cloud environments across Europe, unpatched systems could be targeted for reconnaissance to facilitate more severe attacks.

Mitigation Recommendations

European organizations should prioritize applying the Linux kernel patches that initialize the padding bytes in the vmw_vmci driver to prevent infoleaks. Specifically, ensure that the memset() fix for qp_notify_peer() and qp_notify_peer_local() is applied. System administrators should verify that their Linux distributions have incorporated this patch or upgrade to a kernel version that includes the fix. Additionally, organizations should audit the use of vmw_vmci interfaces and restrict access to trusted users only, minimizing the risk of local exploitation. Employing strict access controls and monitoring for unusual ioctl calls to vmw_vmci devices can help detect exploitation attempts. Where possible, disabling the vmw_vmci driver if not required can eliminate the attack vector. Regularly updating VMware tools and Linux kernel versions is recommended to maintain security. Finally, organizations should consider deploying kernel hardening features and memory sanitizers to detect similar issues proactively.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-05-01T14:05:17.223Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d982cc4522896dcbe4bc3

Added to database: 5/21/2025, 9:09:00 AM

Last enriched: 6/30/2025, 1:40:20 AM

Last updated: 8/21/2025, 9:43:58 AM

Views: 37

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats