{"id":"CVE-2023-52678","state":"PUBLISHED","title":"drm/amdkfd: Confirm list is non-empty before utilizing list_first_entry in kfd_topology.c","description":"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?","publishedAt":"2024-05-17T14:24:42.715Z","updatedAt":"2026-08-05T09:10:59.732Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0f28cca87e9afc22280c44d378d2a6e249933977","status":"affected","lessThan":"4525525cb7161d08f95d0e47025323dd10214313","versionType":"git"},{"version":"0f28cca87e9afc22280c44d378d2a6e249933977","status":"affected","lessThan":"5024cce888e11e5688f77df81db9e14828495d64","versionType":"git"},{"version":"0f28cca87e9afc22280c44d378d2a6e249933977","status":"affected","lessThan":"4ac4e023ed7ab1c7c67d2d12b7b6198fcd099e5c","versionType":"git"},{"version":"0f28cca87e9afc22280c44d378d2a6e249933977","status":"affected","lessThan":"499839eca34ad62d43025ec0b46b80e77065f6d8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdkfd/kfd_topology.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.0","versionType":"semver"},{"version":"6.1.75","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.14","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.2","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdkfd/kfd_topology.c"]}],"references":["https://git.kernel.org/stable/c/4525525cb7161d08f95d0e47025323dd10214313","https://git.kernel.org/stable/c/5024cce888e11e5688f77df81db9e14828495d64","https://git.kernel.org/stable/c/4ac4e023ed7ab1c7c67d2d12b7b6198fcd099e5c","https://git.kernel.org/stable/c/499839eca34ad62d43025ec0b46b80e77065f6d8"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:33.064Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/52xxx/CVE-2023-52678.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-52678","state":"PUBLISHED","datePublished":"2024-05-17T14:24:42.715Z","dateUpdated":"2026-08-05T09:10:59.732Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-03-07T14:49:46.887Z"},"containers":{"cna":{"title":"drm/amdkfd: Confirm list is non-empty before utilizing list_first_entry in kfd_topology.c","descriptions":[{"lang":"en","value":"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?"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0f28cca87e9afc22280c44d378d2a6e249933977","status":"affected","lessThan":"4525525cb7161d08f95d0e47025323dd10214313","versionType":"git"},{"version":"0f28cca87e9afc22280c44d378d2a6e249933977","status":"affected","lessThan":"5024cce888e11e5688f77df81db9e14828495d64","versionType":"git"},{"version":"0f28cca87e9afc22280c44d378d2a6e249933977","status":"affected","lessThan":"4ac4e023ed7ab1c7c67d2d12b7b6198fcd099e5c","versionType":"git"},{"version":"0f28cca87e9afc22280c44d378d2a6e249933977","status":"affected","lessThan":"499839eca34ad62d43025ec0b46b80e77065f6d8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdkfd/kfd_topology.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.0","versionType":"semver"},{"version":"6.1.75","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.14","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.2","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/amd/amdkfd/kfd_topology.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/4525525cb7161d08f95d0e47025323dd10214313"},{"url":"https://git.kernel.org/stable/c/5024cce888e11e5688f77df81db9e14828495d64"},{"url":"https://git.kernel.org/stable/c/4ac4e023ed7ab1c7c67d2d12b7b6198fcd099e5c"},{"url":"https://git.kernel.org/stable/c/499839eca34ad62d43025ec0b46b80e77065f6d8"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"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’s 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."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T09:10:59.732Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.0","versionEndExcluding":"6.1.75"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.0","versionEndExcluding":"6.6.14"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.0","versionEndExcluding":"6.7.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.0","versionEndExcluding":"6.8"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":5.5,"attackVector":"LOCAL","baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"timestamp":"2024-05-31T18:44:29.957691Z","id":"CVE-2023-52678","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"problemTypes":[{"descriptions":[{"type":"CWE","lang":"en","description":"CWE-noinfo Not enough information"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-11-07T17:27:53.284Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/4525525cb7161d08f95d0e47025323dd10214313","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/5024cce888e11e5688f77df81db9e14828495d64","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/4ac4e023ed7ab1c7c67d2d12b7b6198fcd099e5c","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/499839eca34ad62d43025ec0b46b80e77065f6d8","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T23:11:34.502Z"}}]}}}