CVE-2025-21867

7.8 HIGH

📋 TL;DR

A use-after-free vulnerability in the Linux kernel's BPF subsystem allows local attackers to cause memory corruption and potentially crash the system or execute arbitrary code. This affects systems running vulnerable Linux kernel versions with BPF functionality enabled. The vulnerability requires local access to trigger.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Versions before the fix commits (specific versions vary by distribution)
Operating Systems: Linux distributions with vulnerable kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Requires BPF functionality enabled and ability to load BPF programs (typically requires CAP_BPF or CAP_SYS_ADMIN capabilities)

📦 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

Local privilege escalation to kernel-level code execution, leading to complete system compromise and potential data exfiltration.

🟠

Likely Case

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

🟢

If Mitigated

No impact if proper access controls prevent unprivileged users from loading BPF programs.

🌐 Internet-Facing: LOW - Requires local access to exploit, not directly exploitable over network.
🏢 Internal Only: MEDIUM - Local users or compromised accounts could exploit this to escalate privileges or cause denial of service.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires understanding of BPF internals and kernel memory management. The vulnerability was discovered through fuzzing (KMSAN report).

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions containing commits 1a9e1284e87d59b1303b69d1808d310821d6e5f7 or later

Vendor Advisory: https://git.kernel.org/stable/c/1a9e1284e87d59b1303b69d1808d310821d6e5f7

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version from your distribution vendor. 2. Reboot system to load new kernel. 3. Verify kernel version after reboot.

🔧 Temporary Workarounds

Restrict BPF program loading

Linux

Prevent unprivileged users from loading BPF programs to reduce attack surface

sysctl -w kernel.unprivileged_bpf_disabled=1

🧯 If You Can't Patch

  • Implement strict access controls to prevent unprivileged users from loading BPF programs
  • Monitor for suspicious BPF program loading attempts and kernel crashes

🔍 How to Verify

Check if Vulnerable:

Check kernel version and compare with distribution's security advisory. Vulnerable if running kernel before patched versions.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version after update matches patched version from vendor advisory

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic logs
  • KMSAN reports of use-after-free
  • Failed BPF program loads with invalid user_data

Network Indicators:

  • None - local exploit only

SIEM Query:

Search for kernel panic events or failed BPF syscalls in system logs

🔗 References

📤 Share & Export