CVE-2025-21674

5.5 MEDIUM

📋 TL;DR

This CVE describes a lock inversion vulnerability in the Linux kernel's mlx5e driver when enabling IPsec tunnel mode offload. It can cause kernel panics and system crashes, affecting systems using Mellanox network adapters with IPsec offload enabled in debug kernels. The vulnerability is triggered during IPsec security association (SA) operations.

💻 Affected Systems

Products:
  • Linux kernel mlx5e driver for Mellanox network adapters
Versions: Linux kernel versions up to 6.12.0+ (specifically affected versions before fixes in commits 2c3688090f8a1f085230aa839cc63e4a7b977df0, 6d3d69c070d920fbb146d73dd3899a50f25d0901, 87c4417a902151cfe4363166245a3671a08c256c)
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when IPsec packet offload in tunnel mode is enabled, primarily affects debug kernel configurations but could impact production kernels.

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

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 disrupting network connectivity and services.

🟠

Likely Case

System instability or crashes when IPsec tunnel mode offload is enabled, particularly in debug kernel configurations.

🟢

If Mitigated

No impact if IPsec offload is disabled or if not using Mellanox adapters with affected driver versions.

🌐 Internet-Facing: MEDIUM - Systems with IPsec VPN endpoints using affected hardware could be vulnerable to DoS attacks.
🏢 Internal Only: MEDIUM - Internal systems using IPsec with affected hardware could experience stability issues.

🎯 Exploit Status

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

Exploitation requires ability to trigger IPsec SA operations on affected systems. The vulnerability is a race condition/lock inversion issue rather than a traditional memory corruption vulnerability.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Linux kernel with commits 2c3688090f8a1f085230aa839cc63e4a7b977df0, 6d3d69c070d920fbb146d73dd3899a50f25d0901, 87c4417a902151cfe4363166245a3671a08c256c applied

Vendor Advisory: https://git.kernel.org/stable/c/2c3688090f8a1f085230aa839cc63e4a7b977df0

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing the fixes. 2. For distributions: Apply kernel updates from your vendor. 3. Reboot system to load new kernel.

🔧 Temporary Workarounds

Disable IPsec offload

linux

Disable IPsec packet offload functionality to prevent triggering the vulnerability

ethtool -K <interface> rx-udp_tunnel-port-offload off
ethtool -K <interface> tx-udp_tunnel-port-offload off

Disable debug kernel features

linux

Use production kernel configuration without debug features if possible

🧯 If You Can't Patch

  • Disable IPsec tunnel mode offload on Mellanox interfaces
  • Monitor systems for kernel panic logs and implement high availability/failover

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if mlx5e driver is loaded with IPsec offload enabled: 'uname -r' and 'ethtool -k <mlx5_interface> | grep udp_tunnel'

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes the fix commits and test IPsec tunnel mode functionality

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages mentioning mlx5e_xfrm_del_state or lock inversion warnings
  • Soft lockup or deadlock detection in kernel logs
  • IPsec connection failures in system logs

Network Indicators:

  • IPsec tunnel establishment failures
  • Network connectivity loss on systems using IPsec offload

SIEM Query:

source="kernel" AND ("mlx5e_xfrm" OR "lock inversion" OR "SOFTIRQ-safe -> SOFTIRQ-unsafe")

🔗 References

📤 Share & Export