## Summary
`BUG: KFENCE: use-after-free read in nv_dma_release_sgt+0x2c/0x80 [nvidia]`
reproduces on driver **580.178.04** (R580 branch, legacy Pascal GPU), even
though the May 2026 security bulletin
(https://nvidia.custhelp.com/app/answers/detail/a_id/5821) lists a Linux
use-after-free — CVE-2026-24187 — as fixed in R580 as of **580.159.03**, which
this version postdates. So either that fix is incomplete for this path, or
this is a distinct unfixed UAF in the same buffer-release path. I’d appreciate
confirmation of which, and whether a fix is planned for R580.
## Hardware / software
- Dell G7 7588 hybrid: Intel UHD 630 (i915; drives internal eDP panel) +
NVIDIA GTX 1060 Max-Q (GP106, Pascal; drives external HDMI monitor)
- Driver: 580.178.04 (nvidia-580xx-dkms, Arch/EndeavourOS), nvidia_drm.modeset=1
- Kernel 7.2.11-arch1-1 (KFENCE active), Plasma 6.8.1 Wayland as compositor
- Reproduces on both kwin 6.8.1 boots attempted; 8 KFENCE reports total,
first hit 50 seconds after login
## Reproducer (very reliable)
kwin 6.8.1 introduced a multi-GPU buffer copy path with a missing
synchronization (upstream fix pending:
https://invent.kde.org/plasma/kwin/-/merge_requests/10196 — "multigpuswapchain:
fix synchronization with EGL copy"; tracked at
https://bugs.kde.org/show_bug.cgi?id=527591). On hybrid systems where one GPU
renders and the other scans out, this drives buffer import/release cycles that
trigger the UAF within seconds:
1. Hybrid laptop, internal panel on iGPU, external display on the NVIDIA GPU
2. Upgrade to kwin 6.8.1 (Arch: kwin 6.8.1-1), log into a Wayland session
3. Use the desktop normally; `journalctl -k -f | grep KFENCE` reports the UAF
within the first minutes
4. Downgrade to kwin 6.8.0: zero hits over hours, same kernel/driver
## Evidence
KFENCE identifies the allocating, freeing, and re-reading task as
`kwin_wayland` (the compositor): the freed object (kmalloc-512, size 400) is
allocated in `nv_drm_gem_prime_import_sg_table` via
`drm_gem_prime_fd_to_handle` (dma-buf import into nvidia-drm), freed ~17 ms
later through `nv_dma_release_sgt`, then read again at
`nv_dma_release_sgt+0x2c`. After several hits the kernel became tainted
`[B]=BAD_PAGE`. Full report:
attachment on the KDE bug linked above — and the same symbol
was reported on 560.35.03 in
BUG: KFENCE: use-after-free read in nv_dma_release_sgt+0x29/0x70 [nvidia] back in 2024.
Happy to attach an `nvidia-bug-report.sh` bundle and/or a video of the
corruption — the system is currently pinned to kwin 6.8.0 for stability, but
reproducing again is a one-command, <1-minute procedure on demand.
## Questions
1. Is `nv_dma_release_sgt` the code path fixed for CVE-2026-24187 in
580.159.03? If yes, why does it still fire on 580.178.04?
2. The Windows R580 row of the bulletin notes only Maxwell/Volta/Pascal GPUs
are affected — is the Linux R580 legacy-arch path the same code?
3. Is a fix planned for the R580 (legacy) branch, given Pascal users cannot
move to R595?