CVE-2025-38187 drm/nouveau: fix a use-after-free in r535_gsp_rpc_push()

High 7.8 Published Updated

A use-after-free in the Linux kernel's nouveau driver allows attackers to potentially execute code or cause a system crash.

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-38187?

CVE-2025-38187 is a high-severity use after free vulnerability in Linux kernel, published on 4 Jul 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/nouveau: fix a use-after-free in r535_gsp_rpc_push()

The RPC container is released after being passed to r535_gsp_rpc_send().

When sending the initial fragment of a large RPC and passing the caller's RPC container, the container will be freed prematurely. Subsequent attempts to send remaining fragments will therefore result in a use-after-free.

Allocate a temporary RPC container for holding the initial fragment of a large RPC when sending. Free the caller's container when all fragments are successfully sent.

[ Rebase onto Blackwell changes. - Danilo ]

Weakness: CWE-416

Which versions are affected by CVE-2025-38187?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-38187?

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-38187 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-38187, DEBIAN-CVE-2025-38187, GHSA-pf92-pqjf-2hmw, ROOT-OS-DEBIAN-13-CVE-2025-38187, ROOT-OS-UBUNTU-2404-CVE-2025-38187, UBUNTU-CVE-2025-38187.

Is CVE-2025-38187 in your software?

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

Check your SBOMs for free