{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2023-52678",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2023-52678"
  ],
  "published": "2024-05-17T14:32:10Z",
  "summary": "drm/amdkfd: Confirm list is non-empty before utilizing list_first_entry in kfd_topology.c",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdkfd: Confirm list is non-empty before utilizing list_first_entry in kfd_topology.c\n\nBefore using list_first_entry, make sure to check that list is not\nempty, if list is empty return -ENODATA.\n\nFixes the below:\ndrivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1347 kfd_create_indirect_link_prop() warn: can 'gpu_link' even be NULL?\ndrivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1428 kfd_add_peer_prop() warn: can 'iolink1' even be NULL?\ndrivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1433 kfd_add_peer_prop() warn: can 'iolink2' even be NULL?",
  "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.75",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2023-52678"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/4525525cb7161d08f95d0e47025323dd10214313"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/5024cce888e11e5688f77df81db9e14828495d64"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/4ac4e023ed7ab1c7c67d2d12b7b6198fcd099e5c"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/499839eca34ad62d43025ec0b46b80e77065f6d8"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:24:39Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The bug is in drm/amdkfd topology setup (`kfd_create_indirect_link_prop` / `kfd_add_peer_prop`) reached during local AMD GPU device initialization and exposed via local sysfs under `/sys/class/kfd/`; it is not reachable from the network stack.\nAC:L - Once a device with an empty `io_link_props` list is present (e.g., multi-GPU/P2P topology build), `list_first_entry` reliably returns a type-confused pointer with no race or other attacker-uncontrollable timing requirement.\nPR:L - Exploitation requires only an unprivileged local account; world-readable KFD topology sysfs (mode 0444) can be read without capabilities or `/dev/kfd` render-group membership.\nUI:N - No victim interaction is required; topology construction runs during device init and a local attacker can read the resulting sysfs properties directly.\nS:U - Impact remains within the host kernel\u2019s security authority; this is not a VM escape, IOMMU bypass, or other cross-boundary scope change.\nC:H - On an empty list, `list_first_entry` type-confuses the list head as `kfd_iolink_properties`, and `memcpy` copies adjacent `kfd_topology_device` fields (including kernel pointers) into heap objects later exposed through sysfs properties.\nI:H - This is type confusion that fabricates and links corrupted iolink objects into kernel topology lists; per CVSS kernel guidance, type confusion is scored as High integrity impact.\nA:H - The corrupted `gpu` pointer (mapped from adjacent kobject storage) is later passed to `kfd_devcgroup_check_permission()`, which dereferences it as a `kfd_dev` and can oops/panic the kernel on sysfs read."
    }
  }
}
