Skip to main content

CVE-2024-53118: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-53118cvecve-2024-53118
Published: Mon Dec 02 2024 (12/02/2024, 13:44:49 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: vsock: Fix sk_error_queue memory leak Kernel queues MSG_ZEROCOPY completion notifications on the error queue. Where they remain, until explicitly recv()ed. To prevent memory leaks, clean up the queue when the socket is destroyed. unreferenced object 0xffff8881028beb00 (size 224): comm "vsock_test", pid 1218, jiffies 4294694897 hex dump (first 32 bytes): 90 b0 21 17 81 88 ff ff 90 b0 21 17 81 88 ff ff ..!.......!..... 00 00 00 00 00 00 00 00 00 b0 21 17 81 88 ff ff ..........!..... backtrace (crc 6c7031ca): [<ffffffff81418ef7>] kmem_cache_alloc_node_noprof+0x2f7/0x370 [<ffffffff81d35882>] __alloc_skb+0x132/0x180 [<ffffffff81d2d32b>] sock_omalloc+0x4b/0x80 [<ffffffff81d3a8ae>] msg_zerocopy_realloc+0x9e/0x240 [<ffffffff81fe5cb2>] virtio_transport_send_pkt_info+0x412/0x4c0 [<ffffffff81fe6183>] virtio_transport_stream_enqueue+0x43/0x50 [<ffffffff81fe0813>] vsock_connectible_sendmsg+0x373/0x450 [<ffffffff81d233d5>] ____sys_sendmsg+0x365/0x3a0 [<ffffffff81d246f4>] ___sys_sendmsg+0x84/0xd0 [<ffffffff81d26f47>] __sys_sendmsg+0x47/0x80 [<ffffffff820d3df3>] do_syscall_64+0x93/0x180 [<ffffffff8220012b>] entry_SYSCALL_64_after_hwframe+0x76/0x7e

AI-Powered Analysis

AILast updated: 06/28/2025, 15:11:09 UTC

Technical Analysis

CVE-2024-53118 is a vulnerability identified in the Linux kernel's vsock (virtual socket) subsystem, specifically related to the handling of MSG_ZEROCOPY completion notifications. The issue arises because the kernel queues these completion notifications on the socket's error queue, where they remain until explicitly received via recv(). If the socket is destroyed before these notifications are consumed, the queued messages are not cleaned up properly, leading to a memory leak. The vulnerability is rooted in the failure to free allocated memory associated with these queued messages when the socket is closed. The technical details include a backtrace showing kernel functions involved in memory allocation and message handling, such as kmem_cache_alloc_node_noprof, __alloc_skb, sock_omalloc, and msg_zerocopy_realloc, culminating in the vsock transport send and connectible sendmsg functions. This indicates that the flaw is in the kernel's zero-copy messaging mechanism over vsock, which is used for communication between virtual machines and the host or between containers. The leak involves an unreferenced object of size 224 bytes, which, if exploited repeatedly, could lead to resource exhaustion on affected systems. The vulnerability has been fixed by ensuring the error queue is cleaned up when the socket is destroyed, preventing the memory leak. No CVSS score has been assigned yet, and there are no known exploits in the wild at the time of publication.

Potential Impact

For European organizations, the impact of CVE-2024-53118 primarily concerns systems running Linux kernels with vsock support, which is common in environments utilizing virtualization technologies such as KVM/QEMU or container platforms that leverage vsock for inter-VM or host-guest communication. The memory leak could be exploited by an attacker with the ability to create and destroy vsock connections repeatedly, potentially leading to denial of service (DoS) through resource exhaustion. This could degrade system performance or cause crashes, impacting critical infrastructure, cloud services, or enterprise applications relying on Linux virtualization. While the vulnerability does not directly allow code execution or privilege escalation, the resulting DoS could disrupt services, especially in data centers and cloud environments prevalent in Europe. Organizations with high-density virtualized workloads or those using vsock-enabled communication channels are at higher risk. The lack of known exploits suggests this is a lower immediate threat, but the vulnerability should be addressed promptly to avoid future exploitation.

Mitigation Recommendations

European organizations should apply the official Linux kernel patches that address this memory leak as soon as they become available from their Linux distribution vendors. In the interim, system administrators should monitor vsock usage and socket error queues for abnormal growth that could indicate exploitation attempts. Limiting access to vsock interfaces to trusted users and processes can reduce risk. Additionally, implementing resource limits (e.g., cgroups or kernel parameters) to restrict the number of simultaneous vsock connections or memory usage can help mitigate potential DoS impacts. Regular kernel updates and vulnerability scanning should be enforced to detect and remediate this and other kernel vulnerabilities promptly. For environments where patching is delayed, consider isolating vulnerable systems or disabling vsock features if not required, to reduce the attack surface.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-11-19T17:17:24.994Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9824c4522896dcbdfa66

Added to database: 5/21/2025, 9:08:52 AM

Last enriched: 6/28/2025, 3:11:09 PM

Last updated: 7/26/2025, 5:24:34 PM

Views: 10

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