Skip to main content

CVE-2024-57843: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-57843cvecve-2024-57843
Published: Sat Jan 11 2025 (01/11/2025, 14:30:57 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: virtio-net: fix overflow inside virtnet_rq_alloc When the frag just got a page, then may lead to regression on VM. Specially if the sysctl net.core.high_order_alloc_disable value is 1, then the frag always get a page when do refill. Which could see reliable crashes or scp failure (scp a file 100M in size to VM). The issue is that the virtnet_rq_dma takes up 16 bytes at the beginning of a new frag. When the frag size is larger than PAGE_SIZE, everything is fine. However, if the frag is only one page and the total size of the buffer and virtnet_rq_dma is larger than one page, an overflow may occur. The commit f9dac92ba908 ("virtio_ring: enable premapped mode whatever use_dma_api") introduced this problem. And we reverted some commits to fix this in last linux version. Now we try to enable it and fix this bug directly. Here, when the frag size is not enough, we reduce the buffer len to fix this problem.

AI-Powered Analysis

AILast updated: 06/28/2025, 08:25:06 UTC

Technical Analysis

CVE-2024-57843 is a vulnerability identified in the Linux kernel's virtio-net driver, specifically within the function virtnet_rq_alloc. The issue arises from an overflow condition related to the handling of network buffer fragments (frags) in virtualized environments. When a frag is allocated a single page, and the combined size of the buffer plus an internal structure (virtnet_rq_dma, which occupies 16 bytes) exceeds the size of one memory page, an overflow can occur. This overflow is triggered particularly when the sysctl parameter net.core.high_order_alloc_disable is set to 1, causing the frag to always receive a page during refill operations. The vulnerability was introduced by a previous commit (f9dac92ba908) that enabled premapped mode for virtio rings regardless of DMA API usage. The overflow can lead to reliable crashes or failures in operations such as SCP file transfers to virtual machines, especially with large files (e.g., 100MB). The Linux kernel developers addressed this by adjusting buffer lengths when frag sizes are insufficient, effectively preventing the overflow. This vulnerability affects Linux kernel versions identified by the commit hash 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and similar builds. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet.

Potential Impact

For European organizations relying on Linux-based virtualized infrastructure, this vulnerability poses a risk of denial-of-service conditions due to kernel crashes triggered by network buffer overflows in virtio-net. This can disrupt critical services running in virtual machines, including file transfers and network communications, potentially impacting business continuity. Organizations using virtualized environments for cloud services, hosting, or internal infrastructure may experience degraded performance or outages. While the vulnerability does not appear to allow remote code execution or privilege escalation directly, the resulting instability can be exploited to cause service disruptions. This is particularly relevant for data centers and cloud providers in Europe that host multi-tenant environments or provide virtual machine services. The absence of known exploits reduces immediate risk, but the potential for reliable crashes means attackers could develop denial-of-service attacks targeting vulnerable Linux kernels in virtualized setups.

Mitigation Recommendations

European organizations should promptly apply the Linux kernel patches that address CVE-2024-57843 once they are available from their Linux distribution vendors. Specifically, updating to kernel versions that include the fix for the virtio-net overflow is critical. Administrators should verify the sysctl setting net.core.high_order_alloc_disable; if it is set to 1, consider temporarily setting it to 0 as a mitigation until patches are applied, understanding the trade-offs involved. Additionally, organizations should audit their virtualized environments to identify systems running affected kernel versions and prioritize patching those hosting critical workloads or exposed to untrusted networks. Monitoring for unusual kernel crashes or network failures in virtual machines can help detect exploitation attempts. Employing robust backup and recovery procedures for virtual machines will mitigate the impact of potential crashes. Finally, coordinating with Linux distribution security advisories and subscribing to vulnerability notifications will ensure timely awareness of patch releases and related updates.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-01-11T12:32:49.621Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9822c4522896dcbde8d9

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

Last enriched: 6/28/2025, 8:25:06 AM

Last updated: 7/30/2025, 8:32:16 PM

Views: 11

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