CVE-2024-38545

7.8 HIGH

📋 TL;DR

This CVE describes a use-after-free vulnerability in the Linux kernel's RDMA/hns driver where concurrent CQ asynchronous events and CQ destruction can cause the kernel to access freed memory. This affects systems using the hns RDMA driver, primarily servers with Huawei network adapters. The vulnerability could lead to kernel crashes or potential privilege escalation.

💻 Affected Systems

Products:
  • Linux kernel with hns RDMA driver
Versions: Linux kernel versions before the fix commits (specific versions vary by distribution)
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems with the hns RDMA driver loaded and RDMA functionality enabled. Primarily impacts Huawei network adapter users.

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

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic leading to system crash, or potential privilege escalation to kernel-level access allowing full system compromise.

🟠

Likely Case

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

🟢

If Mitigated

Limited impact with proper access controls; attackers would need local access and RDMA permissions.

🌐 Internet-Facing: LOW - Requires local access to the system and RDMA driver interaction.
🏢 Internal Only: MEDIUM - Internal attackers with local access could potentially exploit this to cause system instability or escalate privileges.

🎯 Exploit Status

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

Exploitation requires local access and knowledge of RDMA operations. Race condition makes reliable exploitation challenging.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Linux kernel with commits 330c825e66ef65278e4ebe57fd49c1d6f3f4e34e or later

Vendor Advisory: https://git.kernel.org/stable/c/330c825e66ef65278e4ebe57fd49c1d6f3f4e34e

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing the fix commits. 2. For distributions: Use package manager (apt/yum/dnf) to update kernel. 3. Reboot system to load new kernel.

🔧 Temporary Workarounds

Disable hns RDMA driver

linux

Prevent loading of the vulnerable driver module

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

Restrict RDMA access

linux

Limit which users 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 local user access to the system
  • Monitor system logs for kernel panic or crash events related to RDMA operations

🔍 How to Verify

Check if Vulnerable:

Check if hns module is loaded: lsmod | grep hns. Check kernel version: uname -r and compare with patched versions.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version after update contains fix commits. Check /proc/version or use distribution-specific package verification.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages in /var/log/kern.log or dmesg
  • RDMA-related crash reports
  • Use-after-free kernel warnings

Network Indicators:

  • Unusual RDMA traffic patterns if exploited

SIEM Query:

source="kernel" AND ("panic" OR "Oops" OR "use-after-free") AND "hns"

🔗 References

📤 Share & Export