Skip to contentSkip to conversation

CVE-2026-89807: drm/amdkfd: guard against NULL restore_mqd in CRIU queue restore

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 16

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/amdkfd: guard against NULL restore_mqd in CRIU queue restore

Both create_queue_cpsch() and create_queue_nocpsch() unconditionally call mqd_mgr->restore_mqd() when a CRIU restore is in progress (qd != NULL), with no NULL guard. On any system where restore_mqd is not implemented for the given queue type, a user holding CAP_CHECKPOINT_RESTORE can trigger a kernel NULL pointer dereference and panic the machine by issuing KFD_IOC_CRIU_OP_RESTORE with a crafted queue restore object. Note that checkpoint_mqd is likewise unimplemented on GFX12, so no legitimate CRIU image can reach this path — only a hand-crafted restore payload.

Add a NULL guard for restore_mqd immediately after mqd_mgr is resolved, unwinding via the existing error labels and returning -EOPNOTSUPP if the callback is not implemented. This mirrors the existing checkpoint_mqd guard in checkpoint_mqd().

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

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

	Issue introduced in 6.11 with commit 48f0bdf4e38e42b8285622cfcfc7e6e490b1a719 and fixed in 6.12.110 with commit 19c73848493ab58e39649700da6de11710a36de1
	Issue introduced in 6.11 with commit 48f0bdf4e38e42b8285622cfcfc7e6e490b1a719 and fixed in 6.18.51 with commit ebffa44e7a21ead59ac4b4264e8fc2cbb44c4a21
	Issue introduced in 6.11 with commit 48f0bdf4e38e42b8285622cfcfc7e6e490b1a719 and fixed in 7.2.5 with commit c643c229babe2e8efc5eefe60e19d44868a643ff
	Issue introduced in 6.11 with commit 48f0bdf4e38e42b8285622cfcfc7e6e490b1a719 and fixed in 7.3-rc1 with commit 6aa530642f95d5c48aa336416f94a35e7949b647

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-89807

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/amdkfd/kfd_device_queue_manager.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/19c73848493ab58e39649700da6de11710a36de1
	https://git.kernel.org/stable/c/ebffa44e7a21ead59ac4b4264e8fc2cbb44c4a21
	https://git.kernel.org/stable/c/c643c229babe2e8efc5eefe60e19d44868a643ff
	https://git.kernel.org/stable/c/6aa530642f95d5c48aa336416f94a35e7949b647