CVE-2025-21940

5.5 MEDIUM

📋 TL;DR

A NULL pointer dereference vulnerability exists in the Linux kernel's AMD KFD (Kernel Fusion Driver) component. This vulnerability allows local attackers to cause a kernel panic (denial of service) by triggering a specific IOCTL call sequence. Systems using AMD GPUs with the amdgpu driver are affected.

💻 Affected Systems

Products:
  • Linux kernel with AMD KFD/amdgpu driver
Versions: Linux kernel versions containing the vulnerable code (specific versions not specified in CVE, but patches available in stable branches)
Operating Systems: Linux distributions with affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Requires AMD GPU hardware with KFD driver enabled. Systems without AMD GPUs or with KFD disabled are not vulnerable.

📦 What is this software?

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic leading to system crash and denial of service, potentially causing data loss or service disruption.

🟠

Likely Case

Local denial of service through kernel panic, requiring system reboot to restore functionality.

🟢

If Mitigated

Minimal impact with proper access controls preventing local users from accessing KFD IOCTL interfaces.

🌐 Internet-Facing: LOW - Requires local access to the system; not directly exploitable over network.
🏢 Internal Only: MEDIUM - Local users or processes with KFD access could crash the system, affecting multi-user environments.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW - Simple IOCTL call sequence required

Discovered through fuzzing; requires local access and ability to call KFD IOCTLs.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Linux kernel stable versions containing commit 049e5bf3c8406f87c3d8e1958e0a16804fa1d530

Vendor Advisory: https://git.kernel.org/stable/c/33eb8041c5d6c19d46e7bfd23a031844336afd80

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version from official distribution repositories. 2. Reboot system to load new kernel. 3. Verify kernel version matches patched release.

🔧 Temporary Workarounds

Disable KFD module

linux

Prevent loading of the vulnerable KFD kernel module

echo 'blacklist amdkfd' >> /etc/modprobe.d/blacklist.conf
rmmod amdkfd

Restrict KFD device access

linux

Limit access to KFD device files to prevent exploitation

chmod 600 /dev/kfd
chown root:root /dev/kfd

🧯 If You Can't Patch

  • Restrict local user access to systems with AMD GPUs
  • Implement strict access controls on /dev/kfd device file

🔍 How to Verify

Check if Vulnerable:

Check if KFD module is loaded: lsmod | grep amdkfd. If loaded and kernel version is unpatched, system is vulnerable.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes fix commit: grep -q '049e5bf3c8406f87c3d8e1958e0a16804fa1d530' /proc/version_signature

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages in /var/log/kern.log or dmesg
  • NULL pointer dereference errors mentioning kfd_queue_acquire_buffers

Network Indicators:

  • None - local exploitation only

SIEM Query:

source="kernel" AND ("NULL pointer dereference" OR "kernel panic") AND "kfd"

🔗 References

📤 Share & Export