Skip to contentSkip to conversation

CVE-2025-38521: drm/imagination: Fix kernel crash when hard resetting the GPU

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Aug 16, 2025

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/imagination: Fix kernel crash when hard resetting the GPU

The GPU hard reset sequence calls pm_runtime_force_suspend() and pm_runtime_force_resume(), which according to their documentation should only be used during system-wide PM transitions to sleep states.

The main issue though is that depending on some internal runtime PM state as seen by pm_runtime_force_suspend() (whether the usage count is <= 1), pm_runtime_force_resume() might not resume the device unless needed. If that happens, the runtime PM resume callback pvr_power_device_resume() is not called, the GPU clocks are not re-enabled, and the kernel crashes on the next attempt to access GPU registers as part of the power-on sequence.

Replace calls to pm_runtime_force_suspend() and pm_runtime_force_resume() with direct calls to the driver's runtime PM callbacks, pvr_power_device_suspend() and pvr_power_device_resume(), to ensure clocks are re-enabled and avoid the kernel crash.

The Linux kernel CVE team has assigned CVE-2025-38521 to this issue.

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

	Issue introduced in 6.8 with commit cc1aeedb98ad347c06ff59e991b2f94dfb4c565d and fixed in 6.12.39 with commit 9f852d301f642223c4798f3c13ba15e91165d078
	Issue introduced in 6.8 with commit cc1aeedb98ad347c06ff59e991b2f94dfb4c565d and fixed in 6.15.7 with commit e066cc6e0f094ca2120f1928d126d56f686cd73e
	Issue introduced in 6.8 with commit cc1aeedb98ad347c06ff59e991b2f94dfb4c565d and fixed in 6.16 with commit d38376b3ee48d073c64e75e150510d7e6b4b04f7

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-2025-38521

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/imagination/pvr_power.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/9f852d301f642223c4798f3c13ba15e91165d078
	https://git.kernel.org/stable/c/e066cc6e0f094ca2120f1928d126d56f686cd73e
	https://git.kernel.org/stable/c/d38376b3ee48d073c64e75e150510d7e6b4b04f7