Vulnerability · Published Oct 18, 2026 · Assigned by Linux

CVE-2026-98520drm/amdkfd: fix use-after-free and multi-container gap in kfd_dev_mapping

High 7.8

In plain English

A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 6% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.8High
Exploit odds (30 days)0.2%top 94.1% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official description

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)

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:14linux7.2.9-1DEBIAN-CVE-2026-98520
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-aws-6.14no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-aws-6.17no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-azure-6.11no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-azure-6.14no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-azure-6.17no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-azure-fde-6.14no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-azure-fde-6.17no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-azure-nvidia-6.14no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-gcp-6.11no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-gcp-6.14no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-gcp-6.17no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-hwe-6.11no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-hwe-6.14no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-lowlatency-hwe-6.11no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-nvidia-6.11no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-nvidia-6.17no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-oem-6.11no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-oem-6.14no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-oem-6.8no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-oracle-6.14no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-oracle-6.17no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-riscv-6.14no fix listedUBUNTU-CVE-2026-98520
Ubuntu:24.04:LTSlinux-riscv-6.17no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2026-98520
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2026-98520

Affected products (as reported)

VendorProductVersions
Linux Linux 70cadefcc6160c575b04f763ada34c20e868d577 – before 02b74891624e09a5512c6d84f267d01fcc306a3b70cadefcc6160c575b04f763ada34c20e868d577 – before c3a31087b1c8df679b653c1a09d9abe5ff7ec8ef
Linux Linux 7.2

References