CVE-2024-57843

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.
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

History

24 Sep 2025, 18:41

Type Values Removed Values Added
References () https://git.kernel.org/stable/c/67a11de8965c2ab19e215fb6651d44847e068614 - () https://git.kernel.org/stable/c/67a11de8965c2ab19e215fb6651d44847e068614 - Patch
References () https://git.kernel.org/stable/c/6aacd1484468361d1d04badfe75f264fa5314864 - () https://git.kernel.org/stable/c/6aacd1484468361d1d04badfe75f264fa5314864 - Patch
References () https://git.kernel.org/stable/c/a8f7d6963768b114ec9644ff0148dde4c104e84b - () https://git.kernel.org/stable/c/a8f7d6963768b114ec9644ff0148dde4c104e84b - Patch
CPE cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
CWE CWE-191
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: virtio-net: se corrige el desbordamiento dentro de virtnet_rq_alloc Cuando el fragmento acaba de obtener una página, puede provocar una regresión en la máquina virtual. Especialmente si el valor de sysctl net.core.high_order_alloc_disable es 1, entonces el fragmento siempre obtiene una página cuando se rellena. Lo que podría provocar fallos fiables o fallos de SCP (enviar un archivo de 100 M de tamaño a la máquina virtual). El problema es que virtnet_rq_dma ocupa 16 bytes al principio de un nuevo fragmento. Cuando el tamaño del fragmento es mayor que PAGE_SIZE, todo está bien. Sin embargo, si el fragmento es solo una página y el tamaño total del búfer y virtnet_rq_dma es mayor que una página, puede producirse un desbordamiento. El commit f9dac92ba908 ("virtio_ring: habilitar el modo premapeado sea cual sea el uso de_dma_api") introdujo este problema. Y revertimos algunas confirmaciones para solucionar este problema en la última versión de Linux. Ahora intentamos habilitarlo y solucionar este error directamente. Aquí, cuando el tamaño del fragmento no es suficiente, reducimos la longitud del búfer para solucionar este problema.
First Time Linux
Linux linux Kernel
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 5.5

11 Jan 2025, 15:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-01-11 15:15

Updated : 2025-09-24 18:41


NVD link : CVE-2024-57843

Mitre link : CVE-2024-57843

CVE.ORG link : CVE-2024-57843


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-191

Integer Underflow (Wrap or Wraparound)