drm/amdkfd: Fix mode1 reset crash issue
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ a4c63cafa58b4bd9e15511bab77a4752b93d3aa0 · < f0b4440cdc1807bb6ec3dce0d6de81170803569b| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/amdkfd: Fix mode1 reset crash issue
If HW scheduler hangs and mode1 reset is used to recover GPU, KFD signal user space to abort the processes. After process abort exit, user queues still use the GPU to access system memory before h/w is reset while KFD cleanup worker free system memory and free VRAM.
There is use-after-free race bug that KFD allocate and reuse the freed system memory, and user queue write to the same system memory to corrupt the data structure and cause driver crash.
To fix this race, KFD cleanup worker terminate user queues, then flush reset_domain wq to wait for any GPU ongoing reset complete, and then free outstanding BOs.
From the CVE record · Linux
A use-after-free race in the Linux kernel's drm/amdkfd component can occur when a hung GPU hardware scheduler is recovered with a mode1 reset. During process cleanup, a user queue can write to freed system memory, corrupt a data structure and crash the driver. The input does not specify network access, authentication requirements or user interaction.
Engineers running Linux kernels with drm/amdkfd should check their installations; affected versions were not provided.