Skip to contentSkip to conversation

CVE-2026-99145: drm/xe: Don't transfer shrinker pages for pinned bos on purgeable state change

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 28

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/xe: Don't transfer shrinker pages for pinned bos on purgeable state change

Pinned bos have their pages removed from the shrinker's shrinkable / purgeable counts on pin, and added back on unpin according to the bo's purgeable state at that time.

However, xe_bo_set_purgeable_shrinker() unconditionally transfers pages between the shrinkable and purgeable counts. If the purgeable state of a pinned bo changes, for example by userspace madvising DONTNEED on a VMA of a bo that is also pinned as a scanout buffer, this underflows one count and, after unpin, leaves the other one permanently inflated.

Only update the purgeable flag for pinned bos, and leave the page accounting to unpin.

(cherry picked from commit afe6bc012034123fd838328668e609bf57e46bd3)

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

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

	Issue introduced in 7.1 with commit 536a2ead3a8f2048643da3e8340a4d73fdf71903 and fixed in 7.2.13 with commit 135e998dd1e66b8854db7bd356b6563baf8b9d51
	Issue introduced in 7.1 with commit 536a2ead3a8f2048643da3e8340a4d73fdf71903 and fixed in 7.3 with commit ffbfd3f98f4393e91dffce3a46ccb7cf5329cf2f

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

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/xe/xe_bo.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/135e998dd1e66b8854db7bd356b6563baf8b9d51
	https://git.kernel.org/stable/c/ffbfd3f98f4393e91dffce3a46ccb7cf5329cf2f