CVE-2024-57843

virtio-net: fix overflow inside virtnet_rq_alloc

State
Published
Severity
9.8 Critical
Published
Jan 11, 2025
Updated
Aug 5, 2026
Reserved
Jan 11, 2025

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.19.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HLinux

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 295525e29a5b5694a6e96864f0c1365f79639863 to before a8f7d6963768b114ec9644ff0148dde4c104e84bAffected
  • 295525e29a5b5694a6e96864f0c1365f79639863 to before 67a11de8965c2ab19e215fb6651d44847e068614Affected
  • 295525e29a5b5694a6e96864f0c1365f79639863 to before 6aacd1484468361d1d04badfe75f264fa5314864Affected
LinuxLinux
  • 6.6Affected
  • before 6.6Not affected
  • 6.6.66 through 6.6.*Not affected
  • 6.12.5 through 6.12.*Not affected
  • 6.13 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.