Skip to contentSkip to conversation

CVE-2026-98178: drm/amdgpu: Skip KFD mapping clear before initialization

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 6

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

drm/amdgpu: Skip KFD mapping clear before initialization

amdgpu_amdkfd_clear_kfd_mapping() assumes that a non-NULL kfd_dev has a fully populated node array. This is not true when KFD device initialization fails after probe.

For example, kgd2kfd_device_init() sets num_nodes before checking PCIe atomics support. On Polaris systems without the required atomics, it returns before allocating nodes[0], but the kfd_dev remains attached to the amdgpu device. A later GPU reset then dereferences nodes[0]->id.

Require the authoritative KFD initialization flag before walking the node array, matching the existing KFD reset and teardown paths.

(cherry picked from commit 4ac1835823c47903fbb278bbf474773c46f59edc)

The Linux kernel CVE team has assigned CVE-2026-98178 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 7.2 with commit 70cadefcc6160c575b04f763ada34c20e868d577 and fixed in 7.2.8 with commit 157d3f1db7e7e6f320daa221fae84a4c13555b6f
	Issue introduced in 7.2 with commit 70cadefcc6160c575b04f763ada34c20e868d577 and fixed in 7.3-rc4 with commit 7f9caa70aef0950e06d395ca0035831214d88187

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-98178

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/157d3f1db7e7e6f320daa221fae84a4c13555b6f
	https://git.kernel.org/stable/c/7f9caa70aef0950e06d395ca0035831214d88187