drm/xe/vm: move xa_alloc to prevent UAF
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 |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/xe/vm: move xa_alloc to prevent UAF
Evil user can guess the next id of the vm before the ioctl completes and then call vm destroy ioctl to trigger UAF since create ioctl is still referencing the same vm. Move the xa_alloc all the way to the end to prevent this.
v2: - Rebase
(cherry picked from commit dcfd3971327f3ee92765154baebbaece833d3ca9)
From the CVE record · Linux
The Linux kernel's drm/xe/vm code has a use-after-free vulnerability. A local user can guess a VM ID before the create ioctl completes, then call the VM destroy ioctl while creation still references that VM.
Engineers running Linux kernels with drm/xe/vm should check their systems; affected versions were not provided.