# CVE-2024-57843: virtio-net: fix overflow inside virtnet_rq_alloc

- Severity: Critical 9.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.41%, higher than 37% of CVEs (2026-12-01)
- Published: 2025-01-11T14:30:57.255Z
- Modified: 2026-08-05T11:46:39.052Z
- Weaknesses: CWE-191
- Assigned by: 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 295525e29a5b5694a6e96864f0c1365f79639863 before a8f7d6963768b114ec9644ff0148dde4c104e84b; from 295525e29a5b5694a6e96864f0c1365f79639863 before 67a11de8965c2ab19e215fb6651d44847e068614; from 295525e29a5b5694a6e96864f0c1365f79639863 before 6aacd1484468361d1d04badfe75f264fa5314864; 6.6 (not affected: before 6.6; from 6.6.66 up to 6.6.*; from 6.12.5 up to 6.12.*; from 6.13 up to *)
- linux linux_kernel: before 6.6.66; from 6.7 before 6.12.5

## Every score

- Linux: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/a8f7d6963768b114ec9644ff0148dde4c104e84b> (patch)
- <https://git.kernel.org/stable/c/67a11de8965c2ab19e215fb6651d44847e068614> (patch)
- <https://git.kernel.org/stable/c/6aacd1484468361d1d04badfe75f264fa5314864> (patch)

## Sources

- CVE List: [CVE-2024-57843](https://www.cve.org/CVERecord?id=CVE-2024-57843), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2024-57843](https://nvd.nist.gov/vuln/detail/CVE-2024-57843), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2024-57843 · Whole record: https://cve.day/CVE-2024-57843.json · Rebuilt by cve.day 2026-11-25T22:58:50.939Z
