# CVE-2026-52987: drm/amdgpu: avoid double drm_exec_fini() in userq validate

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.14%, higher than 3% of CVEs (2026-12-01)
- Published: 2026-06-24T16:29:01.633Z
- Modified: 2026-09-10T13:20:25.870Z
- Weaknesses: CWE-1341
- Assigned by: Linux

## Description

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)

(As written by CVE List.)

## Affected

- Linux Linux: from 42f148788469792df207751e2339ef2bb8a1e33e before c7c3ae7c01e5a0742b93cb9b40800bdd7f811e38; from 42f148788469792df207751e2339ef2bb8a1e33e before 508babf310365f1107a2e8831c267c292a286818; 6.19 (not affected: before 6.19; from 7.0.10 up to 7.0.*; from 7.1 up to *)
- kernel: no versions given
- kernel-rt: no versions given
- linux linux_kernel: from 6.19 before 7.0.10; 7.1

## Every score

- Linux: 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`
- redhat-SADP: CVSS:3.1 7.0 High `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/c7c3ae7c01e5a0742b93cb9b40800bdd7f811e38> (patch)
- <https://git.kernel.org/stable/c/508babf310365f1107a2e8831c267c292a286818> (patch)
- <https://access.redhat.com/security/cve/CVE-2026-52987> (third-party-advisory, vdb-entry)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2492365> (issue-tracking, third-party-advisory)
- <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-52987.json> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-52987](https://www.cve.org/CVERecord?id=CVE-2026-52987), CVE Terms of Use, modified 2026-09-10
- NVD: [CVE-2026-52987](https://nvd.nist.gov/vuln/detail/CVE-2026-52987), Public domain, modified 2026-09-10

---

Page: https://cve.day/CVE-2026-52987 · Whole record: https://cve.day/CVE-2026-52987.json · Rebuilt by cve.day 2026-11-25T22:59:25.643Z
