CVE-2026-99619: drm/amdgpu: don't drop the gang dependency fence twice
From: Greg Kroah-Hartman <[email protected]>
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)
The Linux kernel CVE team has assigned CVE-2026-99619 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.2 with commit ed21f6c3fe423b17211fa5a85cd028621a749a2a and fixed in 6.12.118 with commit 2908ef768018ae2bd27eca6cbc79bcabd105a647 Issue introduced in 6.2 with commit ed21f6c3fe423b17211fa5a85cd028621a749a2a and fixed in 6.18.64 with commit 162879c7258267c094f541314fac4133fa222f2d Issue introduced in 6.2 with commit ed21f6c3fe423b17211fa5a85cd028621a749a2a and fixed in 7.3.5 with commit 9135c7b4666a8b49d1ef3d6a214a46e69eea2f2d Issue introduced in 6.2 with commit ed21f6c3fe423b17211fa5a85cd028621a749a2a and fixed in 7.4-rc2 with commit 6d1f901a83603a7d314e4a756b416b11d8dc7e35
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-99619
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/2908ef768018ae2bd27eca6cbc79bcabd105a647 https://git.kernel.org/stable/c/162879c7258267c094f541314fac4133fa222f2d https://git.kernel.org/stable/c/9135c7b4666a8b49d1ef3d6a214a46e69eea2f2d https://git.kernel.org/stable/c/6d1f901a83603a7d314e4a756b416b11d8dc7e35