# CVE-2025-39740: drm/xe/migrate: prevent potential UAF

- 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.17%, higher than 6% of CVEs (2026-12-02)
- Published: 2025-09-11T16:52:14.638Z
- Modified: 2026-10-19T21:10:00.160Z
- Weaknesses: CWE-416
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

drm/xe/migrate: prevent potential UAF

If we hit the error path, the previous fence (if there is one) has
already been put() prior to this, so doing a fence_wait could lead to
UAF. Tweak the flow to do to the put() until after we do the wait.

(cherry picked from commit 9b7ca35ed28fe5fad86e9d9c24ebd1271e4c9c3e)

(As written by CVE List.)

## Affected

- Linux Linux: from 270172f64b114451876c1b68912653e72ab99f38 before 7e46fa64a4b94208563c3a5bf1d7f4346f94abea; from 270172f64b114451876c1b68912653e72ab99f38 before 145832fbdd17b1d77ffd6cdd1642259e101d1b7e; 6.16 (not affected: before 6.16; from 6.16.2 up to 6.16.*; from 6.17 up to *)
- linux linux_kernel: from 6.16 before 6.16.2; 6.17

## 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`
- NVD: 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`

## References

- <https://git.kernel.org/stable/c/7e46fa64a4b94208563c3a5bf1d7f4346f94abea> (patch)
- <https://git.kernel.org/stable/c/145832fbdd17b1d77ffd6cdd1642259e101d1b7e> (patch)

## Sources

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

---

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