Skip to content

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

MediumCVSS 5.5 EPSS 0.75%
Published
Updated
Exploit status
No public exploit known
Technology
Linux KernelUbuntuDebian

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.

Upgrade path

7 packages: 5 fixed, 2 with no fix yet.

PackageAffectedFixed inStatus
cbl-mariner kernel(CBL-Mariner 2.0) All versions No fix listed No fix yet
Microsoft cbl2 kernel 5.15.202.1-1 All versions No fix listed No fix yet
debian/linux(Debian 13) < 6.12.5-1 6.12.5-1 Fixed
debian/linux(Debian 14) < 6.12.5-1 6.12.5-1 Fixed
Linux kernel < 6.6.66; < 6.12.5; < 6.13; = 6.6 +4 more 6.6.66, 6.12.5, 6.13, 6aacd1484468361d1d04badfe75f264fa5314864, 67a11de8965c2ab19e215fb6651d44847e068614, a8f7d6963768b114ec9644ff0148dde4c104e84b Fixed
ubuntu/linux(Ubuntu 24.04) < 6.8.0-58.60 6.8.0-58.60 Fixed
ubuntu/linux-raspi(Ubuntu 24.04) < 6.8.0-1028.32 6.8.0-1028.32 Fixed

Affected products

ProductAffected versionsFixed in
cbl-mariner kernel(CBL-Mariner:2.0) All versions No fix listed
Microsoft cbl2 kernel 5.15.202.1-1 All versions No fix listed
debian/linux(Debian:13) < 6.12.5-1 6.12.5-1
debian/linux(Debian:14) < 6.12.5-1 6.12.5-1
Linux kernel >= 295525e29a5b5694a6e96864f0c1365f79639863, < a8f7d6963768b114ec9644ff0148dde4c104e84b a8f7d6963768b114ec9644ff0148dde4c104e84b
Linux kernel >= 295525e29a5b5694a6e96864f0c1365f79639863, < 67a11de8965c2ab19e215fb6651d44847e068614 67a11de8965c2ab19e215fb6651d44847e068614
Linux kernel >= 295525e29a5b5694a6e96864f0c1365f79639863, < 6aacd1484468361d1d04badfe75f264fa5314864 6aacd1484468361d1d04badfe75f264fa5314864
Linux kernel = 6.6 No fix listed
Linux kernel < 6.6.66 6.6.66
Linux kernel < 6.12.5 6.12.5
Linux kernel < 6.13 6.13
ubuntu/linux(Ubuntu:24.04) < 6.8.0-58.60 6.8.0-58.60
ubuntu/linux-raspi(Ubuntu:24.04) < 6.8.0-1028.32 6.8.0-1028.32
Linux kernel >= 6.7, < 6.12.5 6.12.5

References