Skip to contentSkip to conversation

CVE-2026-89808: drm/amdkfd: Fix the case that vm range is hole at svm_migrate_copy_to_vram

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: Fix the case that vm range is hole at svm_migrate_copy_to_vram

When migration vm range is hole at cpu side(MIGRATE_PFN_MIGRATE set + MIGRATE_PFN_VALID unset) driver still allocates device pages. There is no dma map of src pages and migration. j is 0 and svm_migrate_copy_memory_gart() will return an uninitialized r. That can trigger out_free_vram_pages to drop all VRAM just set up.

Initialize r and only call the last svm_migrate_copy_memory_gart if j > 0.

Current code postponed the last page to the final copy. This patch flushes on the last page when reach to the end of current drm_buddy_block; avoids another svm_migrate_copy_memory_gart.

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

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

	Fixed in 6.18.51 with commit ae806a95b28fcecb913430cfa45a252e91a945d6
	Fixed in 7.2.5 with commit 0a9a0e8a97da70a0336c9115178aaf1be29bcfb1
	Fixed in 7.3-rc1 with commit 520e345ffe05aabef1db82beda4288afb1757ff2

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

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_migrate.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/ae806a95b28fcecb913430cfa45a252e91a945d6
	https://git.kernel.org/stable/c/0a9a0e8a97da70a0336c9115178aaf1be29bcfb1
	https://git.kernel.org/stable/c/520e345ffe05aabef1db82beda4288afb1757ff2