CVE-2025-21714

7.8 HIGH

📋 TL;DR

A use-after-free vulnerability in the Linux kernel's RDMA/mlx5 driver allows double queueing of implicit ODP MR destroy work, potentially leading to memory corruption. This affects systems using RDMA with mlx5 hardware and can cause kernel crashes or instability. The vulnerability requires local access to exploit.

💻 Affected Systems

Products:
  • Linux kernel with mlx5 RDMA driver
Versions: Linux kernel versions before the fix commit 7cc8f681f6d4ae4478ae0f60485fc768f2b450da
Operating Systems: Linux distributions using vulnerable kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Requires RDMA functionality with mlx5 hardware to be enabled and used.

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

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic leading to system crash, denial of service, or potential privilege escalation if combined with other vulnerabilities.

🟠

Likely Case

System instability, kernel crashes, or denial of service affecting RDMA functionality.

🟢

If Mitigated

Minimal impact with proper access controls preventing local exploitation.

🌐 Internet-Facing: LOW - Requires local access to exploit, not remotely exploitable.
🏢 Internal Only: MEDIUM - Local users or processes with RDMA access could trigger the vulnerability.

🎯 Exploit Status

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

Exploitation requires local access and knowledge of RDMA operations to trigger the double queueing condition.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Linux kernel with commit 7cc8f681f6d4ae4478ae0f60485fc768f2b450da or later

Vendor Advisory: https://git.kernel.org/stable/c/7cc8f681f6d4ae4478ae0f60485fc768f2b450da

Restart Required: No

Instructions:

1. Update Linux kernel to version containing the fix commit. 2. For distributions: Use package manager to update kernel package. 3. Rebuild kernel if using custom kernel. 4. No reboot required for live patching systems, otherwise reboot to load new kernel.

🔧 Temporary Workarounds

Disable RDMA mlx5 driver

Linux

Prevent loading of vulnerable mlx5 RDMA driver module

echo 'blacklist mlx5_ib' >> /etc/modprobe.d/blacklist.conf
rmmod mlx5_ib

Restrict RDMA access

Linux

Limit which users/processes can access RDMA devices

chmod 600 /dev/infiniband/*
setfacl -m u:root:rw /dev/infiniband/*

🧯 If You Can't Patch

  • Implement strict access controls to limit which users can use RDMA functionality
  • Monitor system logs for refcount warnings or kernel panics related to mlx5_ib

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if mlx5_ib module is loaded: uname -r && lsmod | grep mlx5_ib

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes fix commit: git log --oneline | grep '7cc8f681f6d4'

📡 Detection & Monitoring

Log Indicators:

  • Kernel logs showing 'refcount_t: underflow; use-after-free'
  • Warnings from free_implicit_child_mr_work
  • Kernel panic messages

Network Indicators:

  • None - local vulnerability only

SIEM Query:

source="kernel" AND ("refcount_warn_saturate" OR "free_implicit_child_mr_work" OR "use-after-free")

🔗 References

📤 Share & Export