Linux kernel denial of service in AMDGPU gang dependency handling
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Original description
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: don't drop the gang dependency fence twice
drm_sched_job_add_dependency() drops the fence reference when it fails, but amdgpu_cs_submit() drops it again, so the scheduled fence of a gang member loses a reference it still needs.
A GFX+COMPUTE gang waiting for another context, with the xarray node allocation for the leader's dependency failed through failslab:
WARNING: drivers/dma-buf/dma-fence.c:589 at dma_fence_release+0x34d/0x730, CPU#1: amd_uapi_regres/2993 drm_sched_job_cleanup+0x2c2/0x340 [gpu_sched] amdgpu_job_free+0xcb/0x3e0 [amdgpu] amdgpu_cs_parser_fini+0x435/0x710 [amdgpu] amdgpu_cs_ioctl+0xcd2/0x7a60 [amdgpu] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] RIP: 0010:dma_fence_signal_timestamp_locked+0x1b8/0x610
(cherry picked from commit 5aa070a83c8378810b906cc8bfc650ce69822a7c)
From the CVE record · Linux