Skip to main content
Vulnerability Database/CVE-2024-26907

CVE-2024-26907: Linux Kernel Use-After-Free Vulnerability

CVE-2024-26907 is a use-after-free flaw in the Linux Kernel's RDMA/mlx5 driver that can lead to memory corruption. This article covers the technical details, affected versions, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-26907 Overview

CVE-2024-26907 is a vulnerability in the Linux kernel's RDMA/mlx5 driver that triggers a fortify-source field-spanning write warning when accessing the Ethernet segment inline header. The flaw occurs in mlx5_ib_post_send at drivers/infiniband/hw/mlx5/wr.c:131, where a memcpy of 56 bytes writes beyond the declared 2-byte eseg->inline_hdr.start field. The issue affects Mellanox ConnectX adapters using IP over InfiniBand (IPoIB) and RDMA workloads. The vulnerability is associated with [CWE-416] Use After Free in the National Vulnerability Database.

Critical Impact

A local authenticated user can trigger memory corruption in the kernel RDMA path, leading to confidentiality, integrity, and availability compromise on affected systems.

Affected Products

  • Linux Kernel (multiple stable branches prior to the fix commits)
  • Debian LTS distributions bundling vulnerable kernel versions
  • Siemens industrial products referenced in advisory SSA-265688

Discovery Timeline

  • 2024-04-17 - CVE-2024-26907 published to the National Vulnerability Database
  • 2026-10-15 - Last updated in NVD database

Technical Details for CVE-2024-26907

Vulnerability Analysis

The vulnerability resides in the mlx5 InfiniBand driver's send path. When the driver constructs a work request for transmission, it writes inline Ethernet header data into the Ethernet segment (eseg) structure of the work queue entry. The memcpy operation copies 56 bytes into the inline_hdr.start member, which is declared as a 2-byte field.

With CONFIG_FORTIFY_SOURCE enabled, the kernel detects this field-spanning write and emits a warning. The code reaches the warning site through the IPoIB transmit path (ipoib_start_xmit → ipoib_send → mlx5_ib_post_send_nodrain) during normal TCP/IP traffic over an InfiniBand interface.

Beyond the warning, the underlying write pattern crosses structure field boundaries in a way that can corrupt adjacent memory and interact unsafely with freed objects, aligning with the [CWE-416] Use After Free classification assigned to this CVE.

Root Cause

The root cause is a mismatch between the declared size of the inline_hdr.start structure member and the actual size of data copied into it by memcpy. The driver treats inline_hdr.start as the beginning of a larger inline header buffer, but the type system expresses it as a short field. Fortify-source instrumentation enforces the declared bound and rejects the write at runtime.

Attack Vector

Exploitation requires local access with low privileges on a system that uses the mlx5_ib driver, typically a host with Mellanox ConnectX hardware configured for IPoIB or user-space RDMA (rdma_ucm, ib_uverbs). A local user generating network traffic that routes through the InfiniBand interface can trigger the vulnerable code path through standard socket operations such as write on a TCP connection. No user interaction beyond standard network activity is required.

The vulnerability is described in prose only; no public proof-of-concept exploit code is referenced in the advisory. See the Linux Kernel patch commit 9a624a5 for the authoritative source change.

Detection Methods for CVE-2024-26907

Indicators of Compromise

  • Kernel log entries containing memcpy: detected field-spanning write (size 56) of single field "eseg->inline_hdr.start"
  • WARNING traces referencing mlx5_ib_post_send+0x191b/0x1a60 [mlx5_ib] in dmesg or /var/log/kern.log
  • Call stacks that include mlx5_ib_post_send_nodrain, ipoib_send, and ipoib_start_xmit

Detection Strategies

  • Inventory hosts with the mlx5_ib and ib_ipoib modules loaded using lsmod | grep -E 'mlx5_ib|ib_ipoib'
  • Compare running kernel versions against the fix commits (185fa07, 4d5e86a, 60ba938, 9a624a5, cad82f1, d27c48d) via uname -r and distribution package metadata
  • Monitor for unexpected kernel warnings on InfiniBand hosts, especially those running RDMA workloads or IPoIB networking

Monitoring Recommendations

  • Forward kernel ring buffer and syslog events to a centralized SIEM and alert on fortify-source warnings referencing mlx5
  • Track module load events for mlx5_ib, rdma_ucm, ib_uverbs, and ib_ipoib to maintain an accurate affected-asset list
  • Correlate kernel warnings with local user activity to identify suspicious trigger patterns

How to Mitigate CVE-2024-26907

Immediate Actions Required

  • Apply the upstream kernel patches referenced in the vendor advisory to all hosts running the mlx5_ib driver
  • Update to a Debian LTS kernel package that includes the fix, as noted in the Debian LTS Security Announcement
  • For Siemens industrial systems, follow guidance in Siemens Security Advisory SSA-265688
  • Restrict local shell access on hosts with Mellanox RDMA hardware to trusted administrators

Patch Information

The fix is distributed across multiple stable kernel branches. Reference commits include 185fa07, 4d5e86a, 60ba938, 9a624a5, cad82f1, and d27c48d. The fix adjusts how the Ethernet segment inline header is accessed so the write no longer spans declared field boundaries.

Workarounds

  • Unload the mlx5_ib module where RDMA and IPoIB are not required: modprobe -r mlx5_ib
  • Disable IPoIB interfaces on affected hosts if InfiniBand networking is not operationally necessary
  • Limit local account provisioning on hosts with Mellanox hardware until patches are deployed
bash
# Verify kernel version and reload mlx5_ib after patching
uname -r
modinfo mlx5_ib | grep -E 'version|filename'
sudo modprobe -r mlx5_ib && sudo modprobe mlx5_ib

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.