CVE-2026-98520·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: drm/amdkfd: fix use-after-free and multi-container gap in kfd_dev_mapping kfd_dev_mapping caches the address_space of the first /dev/kfd opener so that the GPU reset path can call unmap_mapping_range() to zap all userspace mappings of doorbell and MMIO ranges. This design has two bugs that both manifest under SRIOV with multiple containers: 1. Use-after-free / rwsem deadlock. The cached pointer refers to an inode owned by the first opener's container. When that container exits and its inode is released, kfd_dev_mapping becomes a dangling pointer. A subsequent GPU reset dereferences it inside unmap_mapping_range(), which takes i_mmap_rwsem on the freed inode, causing a hard hang observable as an uninterruptible rwsem wait. 2. Multi-container gap. Only the first opener's address_space is cached; VMAs created by later openers live in a different address_space and are never reached by unmap_mapping_range(). After a GPU reset those stale mappings keep doorbell and MMIO pages accessible to guest userspace with no GPU behind them, risking PCIe transaction timeouts and NMI panics. Fix both bugs with the same approach used by DRM core (drm_drv.c): create a private pseudo-filesystem at module init time and allocate one anonymous inode from it. In kfd_open() redirect every opener's file->f_mapping to that inode's address_space. The inode is module-owned, lives exactly as long as the amdgpu module, and collects VMAs from all openers in one address_space. A single unmap_mapping_range() call in the reset path then correctly reaches every container's mappings with no dangling pointer risk. The hang manifests as an NMI backtrace on the GPU reset workqueue stuck spinning in rwsem_down_read_slowpath() with a corrupted i_mmap_rwsem: Workqueue: amdgpu-reset-dev xgpu_ai_mailbox_flr_work [amdgpu] Call Trace: <TASK> kvm_wait+0x1f/0x40 __pv_queued_spin_lock_slowpath+0x31d/0x3a0 _raw_spin_lock_irq+0x51/0x80 rwsem_down_read_slowpath+0xb3/0x550 down_read+0x48/0xd0 unmap_mapping_range+0x71/0x140 kfd_dev_unmap_mapping_range+0x5b/0x140 [amdgpu] amdgpu_amdkfd_clear_kfd_mapping+0xd8/0x190 [amdgpu] amdgpu_device_gpu_recover+0x232/0x450 [amdgpu] xgpu_ai_mailbox_flr_work+0xb5/0xc0 [amdgpu] process_one_work+0x18e/0x3e0 worker_thread+0x2e3/0x420 kthread+0x10a/0x230 (cherry picked from commit 1128b4a52de1572e87431de837fd9850cb99542c)
- Severity
- high
- Software
- Kernel
- Fixed in
- 7.2.9, 7.3
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.17% — higher than 6% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2026-98520 scores 7.8 on CVSS, so a successful attack would be serious — but at 0.17%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
How to fix this CVE
Update your Linux kernel to version 7.2.9 or later (for stable branches) or 7.3+ for mainline to fix a critical use-after-free vulnerability in the AMD KFD GPU driver that can cause system hangs and memory safety issues in SRIOV environments. Most users should apply their distribution's kernel security updates rather than manually upgrading to mainline.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your kernel version with `uname -r` and compare against fixed versions 7.2.9+ or 7.3+
- Step 2: Verify if AMD KFD GPU driver is loaded by running `lsmod | grep amdkfd`; if no output, this CVE does not apply
- Step 3: Check kernel logs for rwsem deadlock patterns with `sudo dmesg | grep -i 'rwsem\|hang\|unmap_mapping' | tail -20`
- Step 4: After patching, confirm the new kernel is booted with `uname -r` and verify amdkfd driver reloaded correctly with `lsmod | grep amdkfd`
FAQ
What is CVE-2026-98520?
This is a use-after-free vulnerability in the AMD KFD (Kernel Fusion Device) GPU memory mapping subsystem that causes system hangs and potential memory corruption when multiple GPU containers are used in SRIOV mode. The bug stems from caching an inode pointer that becomes invalid when the first container exits.
Is CVE-2026-98520 being actively exploited?
No, this vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog, and no public exploits are currently available. However, it can be triggered reliably in specific multi-container SRIOV environments.
What versions of Kernel are affected by CVE-2026-98520?
The vulnerability affects Linux kernel versions prior to 7.2.9 (stable branch) and 7.3 (mainline). Most distributions based on these kernels are affected unless they have already backported the fix.
How do I check if my server is vulnerable to CVE-2026-98520?
Run `uname -r` to get your kernel version, then compare it against 7.2.9 and 7.3. If your version is older and `lsmod | grep amdkfd` returns results, you are vulnerable.
Does Defensia detect CVE-2026-98520?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2026-98520 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-98520. Free for 1 server.
Get started free