CVE-2026-52987: Linux AMD GPU Double-Free Kernel Vulnerability
A memory management bug in AMD GPU drivers for Linux allows a local attacker with user-level privileges to cause denial of service or potentially execute code with elevated privileges. The vulnerability stems from improper cleanup of resource management objects when handling GPU memory validation errors, leaving the system in an unstable state. An attacker would need local access to the affected Linux system but no special permissions beyond standard user rights.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.8 HIGH · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Weaknesses (CWE)
- CWE-1341
- Affected products
- 2 configuration(s)
- Published / Modified
- 2026-06-24 / 2026-07-15
NVD description (verbatim)
In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu: avoid double drm_exec_fini() in userq validate When new_addition is true, amdgpu_userq_vm_validate() calls drm_exec_fini(&exec) before iterating over the collected HMM ranges and calling amdgpu_ttm_tt_get_user_pages(). If amdgpu_ttm_tt_get_user_pages() fails in that path, the code jumps to unlock_all and calls drm_exec_fini(&exec) a second time on the same exec object. drm_exec_fini() is not idempotent: it frees exec->objects and may also drop exec->contended and finalize the ww acquire context. Route that error path directly to the range cleanup once exec has already been finalized. Issue found using a prototype static analysis tool and confirmed by code review. (cherry picked from commit 2802952e4a07306da6ebe813ff1acacc5691851a)
5 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-52987 is a double-free vulnerability in amdgpu's userspace queue (userq) validation logic within the Linux kernel DRM subsystem. Specifically, in the amdgpu_userq_vm_validate() function, when the new_addition flag is set to true, drm_exec_fini() is called prematurely to finalize an execution context. If subsequent calls to amdgpu_ttm_tt_get_user_pages() fail while iterating over HMM (heterogeneous memory management) ranges, the error handler incorrectly invokes drm_exec_fini() a second time on the same exec object. Since drm_exec_fini() deallocates exec->objects and manipulates the acquire context without idempotent safeguards, this double-finalization corrupts kernel data structures. The fix routes the error path directly to range cleanup after the first finalization, preventing the duplicate call.
Business impact
Organizations running AMD GPU-accelerated workloads on Linux systems face localized stability and security risks. Exploitation could lead to system crashes, denial of service to GPU-dependent applications, or privilege escalation depending on kernel memory layout and attack sophistication. For enterprises using AMD GPUs for high-performance computing, machine learning, or rendering pipelines, unpatched systems may experience unexpected service interruptions or, in worst-case scenarios, container escape or kernel privilege escalation if the double-free is weaponized.
Affected systems
The vulnerability affects the Linux kernel's AMD GPU (amdgpu) driver. Specifically, it impacts systems with AMD discrete or integrated GPUs that use the userspace queue validation feature in the DRM (Direct Rendering Manager) subsystem. The vulnerability exists in kernel versions containing the affected amdgpu_userq_vm_validate() code path and only manifests when userspace GPU operations trigger the new_addition validation logic. Verify your kernel version against the Linux distribution's advisory for precise affected ranges.
Exploitability
Exploitation requires local system access with standard user-level privileges. An attacker cannot exploit this remotely. The attack surface is limited to scenarios where a user with GPU access can trigger the userq validation path—typically through graphics applications or compute frameworks that use the AMD GPU driver's user-mode queues. The double-free condition is triggered by intentionally causing amdgpu_ttm_tt_get_user_pages() to fail during validation, which may be feasible by manipulating memory availability or passing crafted GPU commands. While a CVSS score of 7.8 reflects high severity, actual exploitation for privilege escalation depends on kernel memory layout and protection mechanisms in place.
Remediation
Apply the upstream Linux kernel patch cherry-picked from commit 2802952e4a07306da6ebe813ff1acacc5691851a. This patch restructures the error-handling path in amdgpu_userq_vm_validate() to skip the redundant drm_exec_fini() call when exec has already been finalized, ensuring the error path routes directly to HMM range cleanup. Consult your Linux distribution (Ubuntu, Red Hat, SUSE, etc.) for backported kernel updates that include this fix. If running a custom kernel, apply the patch directly to the amdgpu driver code.
Patch guidance
Contact your Linux distribution maintainer for the exact kernel version incorporating this fix. Major distributions typically track upstream Linux kernel patches and release them in regular kernel updates. For Red Hat-based systems, check errata advisories; for Ubuntu, monitor security updates; for SUSE, consult the SUSE Security Advisories. If you maintain a custom kernel, apply the commit 2802952e4a07306da6ebe813ff1acacc5691851a directly to your amdgpu driver source tree, recompile, and validate in a test environment before production deployment. Verify functionality of GPU workloads post-patching.
Detection guidance
Monitor kernel logs for messages related to amdgpu driver failures, HMM range management errors, or GPU validation timeouts that correlate with application crashes or system instability. Use tools like dmesg and journalctl to examine DRM subsystem warnings and errors. In live systems, kprobes or eBPF-based tools can hook drm_exec_fini() calls to detect multiple invocations on the same exec object. Performance monitoring of GPU applications for unexpected terminations or resource leaks may indicate exploitation attempts. Audit access to /dev/dri/* device nodes to understand which users and processes interact with the GPU driver.
Why prioritize this
This vulnerability merits high priority because: (1) it affects a widely-used kernel subsystem with HIGH severity; (2) it requires only local user-level access, lowering the attack bar; (3) exploitation can lead to denial of service or kernel privilege escalation; (4) GPU-accelerated computing is increasingly common in data centers and developer workstations; (5) the double-free pattern is a well-understood kernel exploitation vector. Organizations relying on AMD GPUs should prioritize patching.
Risk score, explained
The CVSS 3.1 score of 7.8 (HIGH) reflects: Attack Vector Local (system access required), Attack Complexity Low (no special conditions beyond triggering the validation path), Privileges Required Low (standard user access sufficient), User Interaction None (automatic exploitation possible), Scope Unchanged (impact confined to the affected system), and impacts all three CIA triad pillars—Confidentiality High (kernel memory may be read), Integrity High (memory corruption possible), Availability High (denial of service or system crash). The score does not account for mitigation by SMEP/SMAP if present, but those protections may be circumvented through sophisticated exploitation.
Frequently asked questions
Can this vulnerability be exploited remotely?
No. CVE-2026-52987 requires local system access with user-level privileges. Remote exploitation is not possible.
Which AMD GPU models are affected?
The vulnerability exists in the amdgpu kernel driver itself, regardless of GPU model. Any AMD discrete or integrated GPU using the DRM subsystem's userq feature on an unpatched kernel is potentially affected. Consult your distribution's advisory for specific hardware support details.
What happens if the system is exploited?
Successful exploitation can cause kernel panic and denial of service, corrupt GPU memory management state, or lead to privilege escalation if the double-free is chained with other kernel vulnerabilities or memory layout techniques. The severity depends on the kernel's memory protections and the attacker's sophistication.
Are containers or virtual machines affected?
Virtual machines using GPU passthrough with AMD GPUs and unpatched host kernels are at risk. Container security depends on the host kernel; containers alone cannot fully mitigate a kernel vulnerability. Both must be patched.
This analysis is provided for informational purposes and reflects publicly available information as of the publish date. SEC.co makes no warranty regarding the accuracy, completeness, or timeliness of this content. Organizations must verify all patch availability and compatibility with their specific systems against official vendor advisories before deployment. Exploitation details and proofs-of-concept are not provided. Always test patches in non-production environments first. For the most current information, consult the Linux kernel security advisories, your distribution maintainer's errata, and the official CVE record. Source: NVD (public-domain), retrieved 2026-07-31. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-46189HIGHLinux Kernel RDMA vmw_pvrdma Double Free Vulnerability
- CVE-2026-0270HIGHCortex XSOAR Path Traversal on Linux — Exploit Requirements & Patching Guide
- CVE-2026-0271HIGHPalo Alto Networks Prisma Access Agent Linux Privilege Escalation
- CVE-2026-10001HIGHChrome Sandbox Escape via PerformanceManager Use-After-Free
- CVE-2026-10002HIGHGoogle Chrome PDFium Use-After-Free Vulnerability (CVSS 8.8)
- CVE-2026-10003HIGHChrome Use-After-Free Code Execution Vulnerability Analysis
- CVE-2026-10006HIGHChrome WebAudio Race Condition Remote Code Execution
- CVE-2026-10007HIGHChrome Use-After-Free in SVG Arbitrary Code Execution (CVSS 8.8)