{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-35880",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-35880"
  ],
  "published": "2024-05-19T08:35:32Z",
  "summary": "io_uring/kbuf: hold io_buffer_list reference over mmap",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nio_uring/kbuf: hold io_buffer_list reference over mmap\n\nIf we look up the kbuf, ensure that it doesn't get unregistered until\nafter we're done with it. Since we're inside mmap, we cannot safely use\nthe io_uring lock. Rely on the fact that we can lookup the buffer list\nunder RCU now and grab a reference to it, preventing it from being\nunregistered until we're done with it. The lookup returns the\nio_buffer_list directly with it referenced.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.6.20-1+rpt1"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.6.20+rpt-rpi-2712",
            "binary_version": "1:6.6.20-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.20+rpt-rpi-v6",
            "binary_version": "1:6.6.20-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.20+rpt-rpi-v7",
            "binary_version": "1:6.6.20-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.20+rpt-rpi-v7l",
            "binary_version": "1:6.6.20-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.20+rpt-rpi-v8",
            "binary_version": "1:6.6.20-1+rpt1"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.6.20-1+rpt1": {
            "linux_commit": "6f16847710cc0502450788b9f12f0a14d3429668",
            "upstream_version": "6.6.20",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.6.26"
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-35880"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/65938e81df2197203bda4b9a0c477e7987218d66"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/5fd8e2359498043e0b5329a05f02d10a9eb91eb9"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/561e4f9451d65fc2f7eef564e0064373e3019793"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:52:36Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The vulnerable path is entered only through local syscalls on an io_uring file descriptor \u2014 `mmap()` with `IORING_OFF_PBUF_RING` racing `io_uring_register(IORING_UNREGISTER_PBUF_RING)`. There is no network, adjacent, or remote-peer path into `io_uring_validate_mmap_request()`.\nAC:L - The attacker owns both sides of the race: one thread loops `mmap()` on the provided-buffer-ring offset while a second thread loops register/unregister of the same bgid on the same fd, with unlimited retries and no dependence on any condition outside the attacker's control.\nPR:L - Only an unprivileged local account is required \u2014 `io_uring_allowed()` permits any user when `sysctl_io_uring_disabled` is 0, which is the kernel default, and `IORING_REGISTER_PBUF_RING` with `IOU_PBUF_RING_MMAP` carries no capability check. This is reachable from inside containers and sandboxes as well.\nUI:N - The attacker performs every step itself \u2014 creating the ring, registering the buffer ring, and driving both racing threads. No victim action or interaction with any other user is needed.\nS:U - The defect and its consequences are confined to kernel memory within the same security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - Without the reference, mmap consumes a `bl->buf_ring` address belonging to a buffer list being concurrently destroyed, and `remap_pfn_range()` installs a persistent `VM_PFNMAP` window onto kernel-allocated ring memory that has already been released back to the context's reusable region pool and can be re-handed to a different buffer group \u2014 an uncontrolled read of kernel memory, and per use-after-free scoring this is High.\nI:H - The resulting mapping is a writable `MAP_SHARED` view of that stale kernel region, so the attacker can write into memory the kernel no longer treats as belonging to the mapping's owner; use-after-free of a refcounted object also enables heap grooming toward a controlled-write primitive.\nA:H - Racing the teardown lets mmap operate on a `buf_ring` pointer being NULLed and on an `io_buffer_list` on its way to `kfree_rcu()`, producing oops/kernel panic; the race is repeatable at will by any local user, so availability loss is complete."
    }
  }
}
