CVE-2024-57843CWE-191

CVE-2024-57843

Critical · published January 11, 2025

CVSS v3.1
9.8
EPSS
0%
Percentile
34.4
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00412 · 34.4th percentile
Weakness
CWE-191 · Integer Underflow (Wrap or Wraparound)
Published
2025-01-11T20:15Z
Affected products (2)
ProductVersionsFixed in
linux/linux_kernel< 6.6.666.6.66
linux/linux_kernel≥ 6.7, < 6.12.56.12.5
References (3)
EPSS history
Timeline
  • 11 JAN 14:30Z
    virtio-net: fix overflow inside virtnet_rq_alloc
    cvelistv5