CVE-2025-21999

7.8 HIGH

📋 TL;DR

This is a use-after-free vulnerability in the Linux kernel's proc filesystem that allows a race condition between module unloading and proc inode instantiation. Attackers could potentially exploit this to cause kernel crashes or execute arbitrary code with kernel privileges. All Linux systems using affected kernel versions are vulnerable.

💻 Affected Systems

Products:
  • Linux Kernel
Versions: Specific affected versions not explicitly stated in CVE; check kernel commit history for vulnerable versions before fixes.
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability exists in default proc filesystem configuration; requires ability to trigger race condition between module operations and proc lookups.

📦 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 →

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 or potential arbitrary code execution with kernel privileges, enabling full system compromise.

🟠

Likely Case

Kernel crash leading to denial of service, system instability, or potential information disclosure.

🟢

If Mitigated

System remains stable with proper patching; unpatched systems risk crashes during module operations.

🌐 Internet-Facing: LOW - Requires local access or ability to load/unload kernel modules.
🏢 Internal Only: MEDIUM - Local attackers or malicious users could exploit this to crash systems or potentially escalate privileges.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: HIGH - Requires precise timing to trigger race condition between rmmod and proc lookup operations.

Exploitation requires local access and ability to load/unload kernel modules; race condition makes reliable exploitation challenging.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions containing commits: 4b0b8445b6fd41e6f62ac90547a0ea9d348de3fa, 63b53198aff2e4e6c5866a4ff73c7891f958ffa4, 64dc7c68e040251d9ec6e989acb69f8f6ae4a10b, 654b33ada4ab5e926cd9c570196fefa7bec7c1df, 966f331403dc3ed04ff64eaf3930cf1267965e53

Vendor Advisory: https://git.kernel.org/stable/c/4b0b8445b6fd41e6f62ac90547a0ea9d348de3fa

Restart Required: Yes

Instructions:

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

🔧 Temporary Workarounds

Restrict module loading

linux

Prevent unauthorized users from loading/unloading kernel modules to reduce attack surface.

echo 1 > /proc/sys/kernel/modules_disabled
chmod 600 /proc/sys/kernel/modules_disabled

Disable unnecessary kernel modules

linux

Remove or blacklist unnecessary kernel modules to reduce potential attack vectors.

echo 'blacklist module_name' >> /etc/modprobe.d/blacklist.conf
update-initramfs -u

🧯 If You Can't Patch

  • Implement strict access controls to prevent unauthorized users from loading/unloading kernel modules.
  • Monitor system logs for kernel panics or unusual module activity and implement crash recovery procedures.

🔍 How to Verify

Check if Vulnerable:

Check kernel version and compare with patched versions from kernel git history; examine if system experiences crashes during concurrent module operations and proc lookups.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes the fix commits; test by attempting to trigger the race condition (not recommended in production).

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages in /var/log/kern.log or dmesg
  • Use-after-free errors in kernel logs
  • Unexpected system crashes during module operations

Network Indicators:

  • None - this is a local kernel vulnerability

SIEM Query:

source="kernel" AND ("Oops" OR "BUG" OR "UAF" OR "use-after-free" OR "proc_get_inode")

🔗 References

📤 Share & Export