drm/xe/uapi: Reject coh_none PAT index for CPU cached memory in madvise
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.18.327.0.97.1In the Linux kernel, the following vulnerability has been resolved:
drm/xe/uapi: Reject coh_none PAT index for CPU cached memory in madvise
Add validation in xe_vm_madvise_ioctl() to reject PAT indices with XE_COH_NONE coherency mode when applied to CPU cached memory.
Using coh_none with CPU cached buffers is a security issue. When the kernel clears pages before reallocation, the clear operation stays in CPU cache (dirty). GPU with coh_none can bypass CPU caches and read stale sensitive data directly from DRAM, potentially leaking data from previously freed pages of other processes.
This aligns with the existing validation in vm_bind path (xe_vm_bind_ioctl_validate_bo).
v2(Matthew brost) - Add fixes - Move one debug print to better place
v3(Matthew Auld) - Should be drm/xe/uapi - More Cc
v4(Shuicheng Lin) - Fix kmem leak issues by the way
From the CVE record · Linux
The Linux kernel's drm/xe madvise ioctl can allow a non-coherent PAT index on CPU-cached memory on iGPUs. A local caller using this configuration could cause the GPU to read stale sensitive data from previously freed pages belonging to other processes.
Engineers running Linux kernels with the drm/xe driver on iGPUs should check their kernel vendor's advisory for affected versions.