Bug 2337148 (CVE-2024-57843) - CVE-2024-57843 kernel: virtio-net: fix overflow inside virtnet_rq_alloc
Summary: CVE-2024-57843 kernel: virtio-net: fix overflow inside virtnet_rq_alloc
Keywords:
Status: NEW
Alias: CVE-2024-57843
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-01-11 15:01 UTC by OSIDB Bzimport
Modified: 2025-01-13 05:29 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-01-11 15:01:42 UTC
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.

Comment 1 Avinash Hanwate 2025-01-13 05:26:57 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025011103-CVE-2024-57843-1c15@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.