Skip to content
Heist/ feed
Back to feed
CriticalFix available

virtio-net: fix overflow inside virtnet_rq_alloc

Type: advisorySources: OSV

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.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.12.5, 6.6.66
CVEs
CVE-2024-57843
Confirmed fixed CVEs
Not specified
Updated in this feed
6 Nov 2026, 02:57 UTC · Revision 1

Source evidence

virtio-net: fix overflow inside virtnet_rq_alloc

core-osv · Original source

Published 11 Jan 2025, 14:30 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.

osv:CVE-2024-57843

Kernel

Fixed versions: 6.6.66, 6.12.5

Complete source record
{
  "id": "a19c13ad569bf9b6c05d5d15daab26b0120d564618c051ae6f30d05a4bef828e",
  "url": "https://osv.dev/vulnerability/CVE-2024-57843",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "virtio-net: fix overflow inside virtnet_rq_alloc",
    "summary": "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.",
    "evidence": "osv:CVE-2024-57843",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.6.66",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.5",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "critical",
    "structured": {
      "id": "CVE-2024-57843",
      "aliases": [
        "CVE-2024-57843"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "295525e29a5b5694a6e96864f0c1365f79639863"
                },
                {
                  "fixed": "a8f7d6963768b114ec9644ff0148dde4c104e84b"
                },
                {
                  "fixed": "67a11de8965c2ab19e215fb6651d44847e068614"
                },
                {
                  "fixed": "6aacd1484468361d1d04badfe75f264fa5314864"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-57843.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.6.0"
                },
                {
                  "fixed": "6.6.66"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.5"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-57843.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:46.395939864Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/67a11de8965c2ab19e215fb6651d44847e068614",
        "https://git.kernel.org/stable/c/6aacd1484468361d1d04badfe75f264fa5314864",
        "https://git.kernel.org/stable/c/a8f7d6963768b114ec9644ff0148dde4c104e84b",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/57xxx/CVE-2024-57843.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-57843",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/57xxx/CVE-2024-57843.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-57843",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 514454,
  "published_at": "2025-01-11T14:30:57.255+00:00"
}