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

High 7.8 Published Updated

A use-after-free vulnerability in the Linux kernel's Xe GPU driver allows attackers to potentially execute code or escalate privileges via error path handling.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-39740?

CVE-2025-39740 is a high-severity use after free vulnerability in Linux kernel, published on 11 Sep 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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)

Weakness: CWE-416

Which versions are affected by CVE-2025-39740?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-39740?

Apply the vendor's patch.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2025-39740 being exploited?

There is no known exploitation of CVE-2025-39740 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-39740, GHSA-p96w-fc3f-mj48, UBUNTU-CVE-2025-39740.

Is CVE-2025-39740 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free