CVE-2025-39830

5.5 MEDIUM

📋 TL;DR

A memory leak vulnerability exists in the Linux kernel's mlx5 HWS (Hardware Steering) buddy allocator error path. When hws_pool_buddy_init() fails, the kernel doesn't free the allocator structure, causing gradual memory exhaustion. This affects systems using Mellanox/NVIDIA ConnectX network adapters with the mlx5 driver.

💻 Affected Systems

Products:
  • Linux kernel with mlx5 driver
Versions: Linux kernel versions containing the vulnerable code (specific versions not provided in CVE, but patches available in stable branches)
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems with Mellanox/NVIDIA ConnectX network adapters using mlx5 driver; vulnerability triggers only when hws_pool_buddy_init() fails during initialization.

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

⚠️ Risk & Real-World Impact

🔴

Worst Case

Sustained exploitation could cause kernel memory exhaustion leading to system instability, crashes, or denial of service requiring reboot.

🟠

Likely Case

Intermittent memory pressure causing performance degradation or occasional system instability when mlx5 driver initialization fails.

🟢

If Mitigated

Minimal impact with proper monitoring and memory limits in place; system remains functional with occasional performance hits.

🌐 Internet-Facing: LOW - Requires local access or ability to trigger mlx5 driver initialization failures; not directly exploitable over network.
🏢 Internal Only: MEDIUM - Local users or processes could potentially trigger the condition, but requires specific driver failure scenarios.

🎯 Exploit Status

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

Exploitation requires ability to trigger mlx5 driver initialization failures; not a typical remote code execution vulnerability.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Patched in Linux kernel stable branches via commits 2c0a959bebdc1ada13cf9a8242f177c5400299e6 and 86d13a6f49cb68aa91bd718b1b627e72e77285c1

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

Restart Required: No

Instructions:

1. Update Linux kernel to version containing the fix. 2. For distributions: Use package manager (apt/yum/dnf) to update kernel package. 3. Rebuild kernel if using custom kernel with backported fix. 4. No reboot required for hotpatch if using livepatch capabilities.

🔧 Temporary Workarounds

Disable mlx5 HWS feature

Linux

Prevent use of Hardware Steering feature that contains the vulnerable code path

echo 0 > /sys/module/mlx5_core/parameters/hws

🧯 If You Can't Patch

  • Monitor kernel memory usage and system logs for memory pressure or mlx5 driver errors
  • Implement memory limits and restart services if memory usage becomes critical

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if mlx5 driver is loaded: lsmod | grep mlx5 && uname -r

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version is patched and check for memory leaks during mlx5 driver testing

📡 Detection & Monitoring

Log Indicators:

  • Kernel oom-killer messages
  • Memory allocation failures in dmesg
  • mlx5 driver initialization errors

Network Indicators:

  • None - this is a local memory management issue

SIEM Query:

source="kernel" AND ("oom-killer" OR "mlx5" AND "allocation failure")

🔗 References

📤 Share & Export