CVE-2025-40340: drm/xe: Fix oops in xe_gem_fault when running core_hotunplug test.
In the Linux kernel, the following vulnerability has been resolved:
drm/xe: Fix oops in xegemfault when running corehotunplug test.
I saw an oops in xegemfault when running the xe-fast-feedback testlist against the realtime kernel without debug options enabled.
The panic happens after corehotunplug unbind-rebind finishes. Presumably what happens is that a process mmaps, unlocks because of the FAULTFLAGRETRYNOWAIT logic, has no process memory left, causing ttmbovmdummypage() to return VMFAULTNOPAGE, since there was nothing left to populate, and then oopses in "memtypeisvram(tbo->resource->memtype)" because tbo->resource is NULL.
It's convoluted, but fits the data and explains the oops after the test exits.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-aws-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1007.7~24.04.1 - Upgrade
Upgrade
ubuntu/linux-gcp-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1008.8~24.04.1 - Upgrade
Upgrade
ubuntu/linux-nvidia-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1008.8 - Upgrade
Upgrade
ubuntu/linux-oem-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1011.11 - Upgrade
Upgrade
ubuntu/linux-oracle-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1007.7~24.04.1 - Upgrade
Upgrade
ubuntu/linux-realtime-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1006.7~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 6.17.0-14.14 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 6.17.0-1007.7 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 6.17.0-1008.8 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 6.17.0-1007.7 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 6.17.0-1007.7 - Upgrade
Upgrade
ubuntu/linux-raspito a version that resolves this vulnerability.Fixed in 6.17.0-1008.8 - Upgrade
Upgrade
ubuntu/linux-realtimeto a version that resolves this vulnerability.Fixed in 6.17.0-1006.7 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 6.17.0-14.14.1
Event History
Frequently Asked Questions
What is the severity of CVE-2025-40340?
CVE-2025-40340 has been classified as a low-severity vulnerability affecting the Linux kernel.
How do I fix CVE-2025-40340?
To fix CVE-2025-40340, ensure you update your Linux kernel to the latest stable version where the vulnerability has been patched.
What systems are affected by CVE-2025-40340?
CVE-2025-40340 affects the Linux kernel specifically during operations related to xe_gem_fault.
What impact does CVE-2025-40340 have on Linux kernel performance?
CVE-2025-40340 can cause system crashes or panics when the core_hotunplug test is executed.
Is there a workaround for CVE-2025-40340?
Currently, the best approach to mitigate CVE-2025-40340 is to apply the kernel update provided by your distribution.