---
id: CVE-2026-52987
title: |-
  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 c…
summary: |-
  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 c…
severity: high
cvss: 7.8
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'
cwe:
  - CWE-1341
vendor: linux
product: linux_kernel
affected:
  - 'linux_kernel >= 6.19, < 7.0.10'
  - linux_kernel = 7.1
patched:
  - linux_kernel 7.0.10
published: '2026-06-24'
updated: '2026-09-10'
sourceUpdated: '2026-09-10T13:20:25.870'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-52987'
references:
  - url: 'https://git.kernel.org/stable/c/508babf310365f1107a2e8831c267c292a286818'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/c7c3ae7c01e5a0742b93cb9b40800bdd7f811e38'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://access.redhat.com/security/cve/CVE-2026-52987'
    label: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2492365'
    label: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-52987.json
    label: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-52987'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-52987'
  - url: >-
      https://lore.kernel.org/linux-cve-announce/2026062443-CVE-2026-52987-29bd@gregkh/T
tags:
  - nvd
  - cve.org
  - csaf
  - vex
  - red-hat
epss: 0.00176
epssPercentile: 0.06245
ingestedAt: '2026-07-11T13:13:25.556Z'
scores:
  nvd: 7.8
  vendor: 7
  cna: 7.8
---

## Overview

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)

## Affected

- `linux_kernel >= 6.19, < 7.0.10`
- `linux_kernel = 7.1`

## Remediation

Upgrade past the affected range:

- `linux_kernel 7.0.10`

## Vendor advisories

- **Red Hat VEX** · Important · affected: Red Hat Enterprise Linux 9, Red Hat Enterprise Linux 6 · no fix planned: Red Hat Enterprise Linux 9 · updated 2026-09-10 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-52987.json)
