CVE Database›Document archive›CVE-2024-57843

CVE-2024-57843

kernel: virtio-net: fix overflow inside virtnet_rq_alloc

Loading…

Severity

Moderate

Red Hat Product Security

5.5

CVSS 3.1

Review impact separately from score.

Published · January 11, 2025

Updated · October 30, 2026

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.

Statement

This vulnerability is rated as Moderate because successful exploitation is restricted to virtualized environments utilizing the virtio-net network driver and primarily leads to a local denial of service through a guest kernel crash or network failure. Under standard Red Hat Enterprise Linux configurations, higher-order page allocations are enabled by default, meaning receive buffer refills typically do not encounter the single-page allocation condition required to trigger this flaw. Exposure is largely confined to instances under severe memory pressure or where non-default memory management tunables enforce single-page allocations, with no compromise to the underlying hypervisor host.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

No mitigation is specified in collected source.

CVSS / CWE

CVSS 3.1 · 5.5
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

CWE-131 · Incorrect Calculation of Buffer Size