CVE-2025-21720

5.5 MEDIUM

📋 TL;DR

A NULL pointer dereference vulnerability in the Linux kernel's XFRM subsystem when IP forwarding is enabled with IPsec hardware offload. This causes kernel panic (system crash) when packets with leftover secpath entries are re-processed by network drivers. Affects Linux systems using IPsec hardware acceleration with IP forwarding enabled.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Kernel versions up to and including 6.13.0-rc1 (specific affected range depends on backports)
Operating Systems: Linux distributions using vulnerable kernel versions
Default Config Vulnerable: ✅ No
Notes: Requires IP forwarding enabled (/proc/sys/net/ipv4/ip_forward = 1) AND IPsec hardware offload configured (xfrm_offload). Specific hardware drivers like mlx5 are mentioned but others may be affected.

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

⚠️ Risk & Real-World Impact

🔴

Worst Case

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

🟠

Likely Case

System crash when IP forwarding is enabled with IPsec hardware offload, requiring manual reboot to restore service.

🟢

If Mitigated

No impact if IP forwarding is disabled or IPsec hardware offload is not used.

🌐 Internet-Facing: MEDIUM - Requires specific IPsec hardware offload configuration and IP forwarding enabled, but could be triggered by network traffic.
🏢 Internal Only: MEDIUM - Same technical risk but limited to internal network traffic patterns.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: NO
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires ability to send network traffic that triggers the IPsec offload path with IP forwarding enabled. No authentication needed but requires specific network configuration.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in kernel commits: 600258d555f0710b9c47fb78d2d80a4aecd608cc, 6945701ca1572f81bc9bb46f624b02eabb3eaf3e, 981ad4c882096e7375b8c2181dd4c3ee58ea5bae, c6e1b2cac24b2a4d1dd472071021bf00c26450eb

Vendor Advisory: https://git.kernel.org/stable/c/600258d555f0710b9c47fb78d2d80a4aecd608cc

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing the fix. 2. Check with your distribution for backported patches. 3. Reboot system after kernel update.

🔧 Temporary Workarounds

Disable IP forwarding

linux

Prevents the vulnerable code path by disabling packet forwarding

echo 0 > /proc/sys/net/ipv4/ip_forward
sysctl -w net.ipv4.ip_forward=0

Disable IPsec hardware offload

linux

Use software IPsec instead of hardware acceleration

Check network driver documentation for disabling offload features

🧯 If You Can't Patch

  • Disable IP forwarding if not required for system function
  • Use software-based IPsec instead of hardware offload

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if IP forwarding is enabled: uname -r && cat /proc/sys/net/ipv4/ip_forward

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version is patched and check system logs for absence of XFRM/offload related crashes

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages mentioning mlx5e_ipsec_handle_tx_skb, XFRM, or secpath
  • NULL pointer dereference in network driver code
  • System crash/reboot logs

Network Indicators:

  • Sudden loss of IPsec connectivity
  • Network interface resets

SIEM Query:

source="kernel" AND ("XFRM" OR "secpath" OR "mlx5e_ipsec" OR "NULL pointer dereference")

🔗 References

📤 Share & Export