CVE-2026-68102: drm/amdgpu: fix aperture mapping leak
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu: fix aperture mapping leak
amdgpupciremove() calls drmdevunplug() before invoking the driver fini routines. This causes drmdeventer() in amdgputtmfini() to always return false, so iounmap(aperbasekaddr) never runs on normal driver unload, leaving an orphaned entry in the x86 PAT interval tree.
On connectedtocpu hardware, the aperture is mapped write-back (WB) via ioremapcache(). On reload, IP discovery calls memremap(..., MEMREMAPWC) over the same range. The WC vs WB conflict causes:
ioremap error for 0x..., requested 0x1, got 0x0 amdgpu: discovery failed: -2
Fix by switching to devres-managed mappings so cleanup is guaranteed regardless of drmdeventer() state:
- connectedtocpu path: devmmemremap(MEMREMAPWB). For IORESOURCESYSTEMRAM ranges this takes the tryramremap() shortcut, returning va(offset) from the existing kernel direct map. No new ioremap VA or PAT entry is created, so there is nothing to orphan.
- dGPU path: devmioremapwc() registers iounmap() as a devres action, guaranteeing cleanup at devicedel() time.
Also remove iounmap(aperbasekaddr) from amdgpudeviceunmapmmio() since the mapping is now devres-owned.
v2: Remove redundant x8664 guard (Lijo)
(cherry picked from commit d871e99879cb5fd1fa798b006b4888887e63a17a)
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Update drm/amdgpu aperture mapping code to use devres-managed mappings (devm_memremap and/or devm_ioremap_wc) so cleanup is guaranteed on device_del()/reload. Remove the manual iounmap(aper_base_kaddr) call from amdgpu_device_unmap_mmio() and rely on devres-managed cleanup.
Linux kernel (drm/amdgpu) aperture mapping cleanup Use devres-managed mappings for aper_base_kaddr instead of manual iounmap = devres-managed mapping via devm_* (e.g., devm_memremap(MEMREMAP_WB) / devm_ioremap_wc())
Event History
Frequently Asked Questions
What is the severity of CVE-2026-68102?
The severity of CVE-2026-68102 is rated at 12.
How do I fix CVE-2026-68102?
To fix CVE-2026-68102, ensure that you update to the latest version of the Linux kernel where the vulnerability is addressed.
What types of systems are affected by CVE-2026-68102?
CVE-2026-68102 affects systems running the Linux kernel that utilize the amdgpu driver.
What consequences could arise from CVE-2026-68102?
If exploited, CVE-2026-68102 could lead to potential memory leaks that may compromise system stability.
How can I verify if my system is vulnerable to CVE-2026-68102?
You can verify your system's vulnerability to CVE-2026-68102 by checking your Linux kernel version against the versions that contain the fix.