CVE-2024-53224

5.5 MEDIUM

📋 TL;DR

A race condition vulnerability in the Linux kernel's RDMA/mlx5 driver allows a NULL pointer dereference during device deregistration. This can cause kernel panics and system crashes on systems using InfiniBand/RDMA with mlx5 hardware. Affected systems are those running vulnerable Linux kernel versions with mlx5_ib driver loaded.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Specific versions mentioned in references (5.14.0-162.6.1.el9_1.x86_64 shown in trace), but exact range requires checking git commits
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when mlx5_ib RDMA driver is loaded and active (requires Mellanox/NVIDIA InfiniBand hardware or virtual RDMA devices)

📦 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 system crash and denial of service, potentially causing data loss or service disruption.

🟠

Likely Case

System crash or kernel panic when RDMA devices are being deregistered, leading to temporary service interruption.

🟢

If Mitigated

No impact if patched or if RDMA/mlx5 driver is not in use.

🌐 Internet-Facing: LOW - Requires local access or RDMA network access, not typically internet-exposed.
🏢 Internal Only: MEDIUM - Can be triggered by legitimate administrative actions or RDMA network events in data center environments.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: NO
Unauthenticated Exploit: ✅ No
Complexity: HIGH

Requires triggering specific race condition during device deregistration, typically requires local access or RDMA network access

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Patches available in git commits: 542bd62b7a7f37182c9ef192c2bd25d118c144e4, 6b0acf6a94c31efa43fce4edc22413a3390f9c05, 921fcf2971a1e8d3b904ba2c2905b96f4ec3d4ad, ede132a5cf559f3ab35a4c28bac4f4a6c20334d8

Vendor Advisory: https://git.kernel.org/stable/c/542bd62b7a7f37182c9ef192c2bd25d118c144e4

Restart Required: Yes

Instructions:

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

🔧 Temporary Workarounds

Disable mlx5_ib module

linux

Prevent loading of the vulnerable RDMA driver if not required

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

Disable RDMA services

linux

Stop RDMA services if not needed

systemctl stop rdma.service
systemctl disable rdma.service

🧯 If You Can't Patch

  • Avoid unnecessary RDMA device registration/deregistration cycles
  • Implement strict access controls to prevent unauthorized users from triggering RDMA operations

🔍 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 is updated and check git commit contains the fix: grep -r 'MLX5_IB_STAGE_DEVICE_NOTIFIER' /usr/src/linux-headers-$(uname -r)/

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages mentioning 'pkey_change_handler [mlx5_ib]'
  • NULL pointer dereference in mlx5_ib module
  • System crash/reboot logs

Network Indicators:

  • Unusual RDMA connection/disconnection patterns

SIEM Query:

event_source="kernel" AND (message CONTAINS "mlx5_ib" OR message CONTAINS "pkey_change_handler" OR message CONTAINS "NULL pointer dereference")

🔗 References

📤 Share & Export