CVE-2025-40340

Source
https://cve.org/CVERecord?id=CVE-2025-40340
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40340.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-40340
Downstream
Related
Published
2025-12-09T04:09:57.059Z
Modified
2026-03-12T03:54:40.446112Z
Summary
drm/xe: Fix oops in xe_gem_fault when running core_hotunplug test.
Details

In the Linux kernel, the following vulnerability has been resolved:

drm/xe: Fix oops in xegemfault when running core_hotunplug 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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40340.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
dd08ebf6c3525a7ea2186e636df064ea47281987
Fixed
99428bd6123d5676209dfb1d7a8f176cc830b665
Fixed
29a3064f9c5a908aaf0b39cd6ed30374db11840d
Fixed
1cda3c755bb7770be07d75949bb0f45fb88651f6

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40340.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.8.0
Fixed
6.12.58
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.17.8

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40340.json"