CVE-2025-21940 drm/amdkfd: Fix NULL Pointer Dereference in KFD queue

Medium 5.5 Published Updated

A local attacker can trigger a NULL pointer dereference in the AMD KFD driver via IOCTL, causing 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-21940?

CVE-2025-21940 is a medium-severity vulnerability in Linux kernel, published on 1 Apr 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/amdkfd: Fix NULL Pointer Dereference in KFD queue

Through KFD IOCTL Fuzzing we encountered a NULL pointer derefrence when calling kfd_queue_acquire_buffers.

(cherry picked from commit 049e5bf3c8406f87c3d8e1958e0a16804fa1d530)

Weakness: CWE-476

Which versions are affected by CVE-2025-21940?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-21940?

Apply the vendor's patch.

Is CVE-2025-21940 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-21940, DEBIAN-CVE-2025-21940, GHSA-f3mw-fg4x-6x2p, UBUNTU-CVE-2025-21940.

Is CVE-2025-21940 in your software?

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

Check your SBOMs for free