{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-42123",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-42123"
  ],
  "published": "2024-07-30T07:47:52Z",
  "summary": "drm/amdgpu: fix double free err_addr pointer warnings",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdgpu: fix double free err_addr pointer warnings\n\nIn amdgpu_umc_bad_page_polling_timeout, the amdgpu_umc_handle_bad_pages\nwill be run many times so that double free err_addr in some special case.\nSo set the err_addr to NULL to avoid the warnings.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:H/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": null,
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-42123"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/8e24beb3c2b08a4763f920399a9cc577ed440a1a"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/506c245f3f1cd989cb89811a7f06e04ff8813a0d"
    }
  ],
  "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.0,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The vulnerable path is reached only through local GPU access \u2014 a compute job on /dev/kfd + /dev/dri/renderD* raising a per-PASID poison-consumption interrupt, or the driver's own page-retirement kthread. No network or adjacent-network input reaches amdgpu_umc_handle_bad_pages().\nAC:H - Triggering requires a real uncorrectable ECC/poison event in GPU HBM and, on a later poll iteration, amdgpu_dpm_get_ecc_info() returning a value other than 0 or -EOPNOTSUPP so that neither allocation branch runs \u2014 both conditions are hardware/firmware state the attacker cannot manufacture. The ~100-iteration polling loop gives many attempts per event, but the initiating hardware fault remains outside attacker control.\nPR:L - The consumption side is driven by an unprivileged userspace compute process \u2014 event_interrupt_poison_consumption_v11() dispatches on the job's PASID, and /dev/kfd and /dev/dri/renderD* are routinely granted to the render group on ML/HPC and multi-tenant GPU nodes and inside GPU containers. Root is not required (the debugfs ras_ctrl injection interface is merely a more reliable alternate route, and is itself created with world-writable S_IWUGO mode bits).\nUI:N - The double free happens autonomously inside the RAS interrupt handler and the amdgpu_ras_page_retirement_thread kthread once the poison event occurs. No victim action of any kind is needed.\nS:U - The corruption is confined to the host kernel's slab allocator, within the same security authority. The SR-IOV VF branch of amdgpu_umc_poison_handler() bypasses this code entirely, so no guest-to-host or IOMMU boundary is crossed.\nC:H - Beyond the generic UAF read primitive from a double free, there is a concrete disclosure path: the stale err_addr is passed to amdgpu_ras_add_bad_pages() with a persisted err_addr_cnt, copying freed slab contents into con->eh_data->bps, which are then persisted to the RAS EEPROM and readable by any local user through the S_IRUGO gpu_vram_bad_pages sysfs binary attribute.\nI:H - Freeing the same kcalloc'd object twice corrupts the SLUB freelist and, if the object is reallocated between the two frees, releases a live in-use allocation \u2014 a standard route to a controlled arbitrary-write primitive. The stale-pointer data additionally drives amdgpu_vram_mgr_reserve_range() and permanent RAS EEPROM writes with garbage retired-page addresses.\nA:H - With CONFIG_SLAB_FREELIST_HARDENED or SLUB debug the double free is detected and panics/BUGs immediately; without it the resulting freelist corruption and use-after-free crash the kernel. Either way the outcome is a full denial of service, compounded by the mode-2 GPU reset already in flight on this path."
    }
  }
}
