CVE-2025-21791

7.8 HIGH

📋 TL;DR

This CVE describes a use-after-free vulnerability in the Linux kernel's VRF (Virtual Routing and Forwarding) subsystem. The l3mdev_l3_out() function can be called without proper RCU protection, potentially allowing local attackers to cause memory corruption or kernel crashes. This affects Linux systems using VRF functionality.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Specific affected versions not explicitly stated in CVE, but patches exist for stable kernel trees
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when VRF functionality is enabled and used. Many default configurations may not have VRF enabled.

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

⚠️ Risk & Real-World Impact

🔴

Worst Case

Local privilege escalation to root, kernel panic leading to denial of service, or arbitrary code execution in kernel context.

🟠

Likely Case

Kernel crash or denial of service affecting system stability, potentially requiring reboot.

🟢

If Mitigated

Limited impact if proper access controls prevent local user access or if VRF is not configured.

🌐 Internet-Facing: LOW - This is a local vulnerability requiring access to the system.
🏢 Internal Only: MEDIUM - Internal users with shell access could potentially exploit this vulnerability.

🎯 Exploit Status

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

Requires local access and knowledge of kernel exploitation techniques. No public exploit code known at this time.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Patches available in stable kernel trees (see references for specific commits)

Vendor Advisory: https://git.kernel.org/stable/c/022cac1c693add610ae76ede03adf4d9d5a2cf21

Restart Required: Yes

Instructions:

1. Update to a patched kernel version from your distribution vendor. 2. Reboot the system to load the new kernel. 3. Verify the fix by checking kernel version.

🔧 Temporary Workarounds

Disable VRF functionality

Linux

If VRF is not required, disable it to eliminate the attack surface

echo 'blacklist vrf' > /etc/modprobe.d/disable-vrf.conf
rmmod vrf

🧯 If You Can't Patch

  • Restrict local user access to prevent potential exploitation
  • Implement strict access controls and monitor for suspicious local activity

🔍 How to Verify

Check if Vulnerable:

Check if VRF module is loaded: lsmod | grep vrf

Check Version:

uname -r

Verify Fix Applied:

Check kernel version against patched versions from your distribution vendor

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages
  • OOPs (kernel crash) logs in /var/log/messages or journalctl
  • Unexpected system reboots

Network Indicators:

  • None - this is a local vulnerability

SIEM Query:

source="kernel" AND ("panic" OR "Oops" OR "general protection fault")

🔗 References

📤 Share & Export