{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-41064",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-41064"
  ],
  "published": "2024-07-29T14:58:20Z",
  "summary": "powerpc/eeh: avoid possible crash when edev->pdev changes",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\npowerpc/eeh: avoid possible crash when edev->pdev changes\n\nIf a PCI device is removed during eeh_pe_report_edev(), edev->pdev\nwill change and can cause a crash, hold the PCI rescan/remove lock\nwhile taking a copy of edev->pdev->bus.",
  "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.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.101",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-41064"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/8836e1bf5838ac6c08760e0a2dd7cf6410aa7ff3"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/033c51dfdbb6b79ab43fb3587276fa82d0a329e1"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/4fad7fef847b6028475dd7b4c14fcb82b3e51274"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/4bc246d2d60d071314842fa448faa4ed39082aff"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/f23c3d1ca9c4b2d626242a4e7e1ec1770447f7b5"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/428d940a8b6b3350b282c14d3f63350bde65c48b"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/a1216e62d039bf63a539bbe718536ec789a853dd"
    }
  ],
  "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 PowerPC EEH recovery path is entered locally \u2014 via `eeh_check_failure()` embedded in the MMIO accessors when a local process drives I/O on a frozen PE \u2014 and raced against the local PCI rescan/remove path (sysfs remove, DLPAR, hotplug). There is no remote or network-facing entry to `eeh_pe_bus_get()`.\nAC:L - The attacker drives the racing side (device removal) while the recovery sequence holds the stale `edev->pdev` across `eeh_pe_report()` driver callbacks and `eeh_wait_state()` waits of up to 300 seconds, and `eeh_pe_bus_get()` is reached at multiple points in that sequence, giving a wide and repeatable window.\nPR:L - Entry into the vulnerable recovery path requires no privileges \u2014 `eeh_check_failure()`/`eeh_dev_check_failure()`/`eeh_send_failure_ev ent()` perform no capability check, so ordinary unprivileged I/O on an affected PCI device queues the EEH event that reaches `eeh_pe_bus_get()`.\nUI:N - No victim action is needed; the EEH event is queued automatically by the MMIO accessor macros and the recovery kthread runs on its own.\nS:U - The stale dereference and any resulting corruption stay within the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - This is a use-after-free read of a `kfree()`d `struct pci_dev`, and the value read (`pdev->bus`) is propagated into further dereferences in `eeh_pe_loc_get_bus()` and the PCI hotplug core, so a reallocated and groomed slab yields an attacker-chosen pointer that the kernel then follows and exposes.\nI:H - The stale/attacker-influenced `struct pci_bus *` is handed to `pci_hp_remove_devices()` and `pci_hp_add_devices()`, which walk and unlink device lists through it, turning the UAF into list corruption and a write primitive exploitable for control-flow hijacking.\nA:H - The commit explicitly describes a crash; dereferencing a freed or concurrently NULLed `edev->pdev` oopses the `eehd` kthread and derails PCI error recovery, leaving the affected devices unusable."
    }
  }
}
