drm/xe: Fix oops in xe_gem_fault when running core_hotunplug test.
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.12.586.17.86.18In the Linux kernel, the following vulnerability has been resolved:
drm/xe: Fix oops in xe_gem_fault when running core_hotunplug test.
I saw an oops in xe_gem_fault when running the xe-fast-feedback testlist against the realtime kernel without debug options enabled.
The panic happens after core_hotunplug unbind-rebind finishes. Presumably what happens is that a process mmaps, unlocks because of the FAULT_FLAG_RETRY_NOWAIT logic, has no process memory left, causing ttm_bo_vm_dummy_page() to return VM_FAULT_NOPAGE, since there was nothing left to populate, and then oopses in "mem_type_is_vram(tbo->resource->mem_type)" because tbo->resource is NULL.
It's convoluted, but fits the data and explains the oops after the test exits.
From the CVE record · Linux
The Linux kernel’s drm/xe GEM fault handler can dereference a NULL resource and cause a kernel oops. The issue was observed locally after the core_hotunplug unbind-rebind test, when a process’s memory mapping fault took a retry path and no memory remained to populate. The input does not establish whether an attacker can trigger it outside those conditions.
Engineers running Linux kernels that use the drm/xe driver should check their kernel’s advisory; affected versions were not provided.