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-26872 Overview
CVE-2024-26872 is a use-after-free vulnerability [CWE-416] in the Linux kernel's RDMA/srpt (SCSI RDMA Protocol target) subsystem. The flaw exists in the srpt_refresh_port() function and was detected through KASAN (Kernel Address Sanitizer) reports showing use-after-free writes. The root cause is a race condition where an event handler is registered before the srpt device is fully initialized. If initialization fails mid-setup, a partially configured event handler remains in place and can be invoked against freed memory. The fix defers event handler registration until srpt device initialization completes successfully. The vulnerability affects multiple Linux kernel versions and Debian Linux 10.0.
Critical Impact
An attacker with local, low-privileged access to a system running the RDMA/srpt kernel module can trigger memory corruption, potentially leading to kernel-level privilege escalation or system compromise.
Affected Products
- Linux Kernel (multiple versions prior to the fix commits)
- Debian Linux 10.0
- Siemens industrial products referenced in advisory SSA-265688
Discovery Timeline
- 2024-04-17 - CVE-2024-26872 published to NVD
- 2024-06 - Debian LTS security announcement published
- 2026-10-15 - Last updated in NVD database
Technical Details for CVE-2024-26872
Vulnerability Analysis
The vulnerability resides in the Linux kernel RDMA target subsystem that implements SCSI over RDMA (SRP target). KASAN flagged a use-after-free write inside srpt_refresh_port(), indicating the function accessed memory that had already been released. The condition is triggered during device initialization when an InfiniBand event handler is registered too early. If an error occurs during the remaining setup, the partially initialized srpt device structure may be freed while the event handler remains active in the kernel's notifier chain. A subsequent event causes the handler to dereference the freed structure.
Exploitation requires local access and the ability to interact with RDMA/InfiniBand devices. Successful exploitation can corrupt kernel memory, with impact extending to confidentiality, integrity, and availability of the host.
Root Cause
The root cause is improper ordering of initialization steps in the srpt device setup code. The event handler was registered before all device fields were populated and before the device was marked as fully initialized. This created a window during which error-path cleanup could leave a dangling event handler pointing to a partially freed object, violating the lifetime assumptions of the RDMA event notifier framework.
Attack Vector
The attack vector is local with high attack complexity and requires low privileges. An attacker must be able to influence device initialization timing or trigger an initialization failure on a system where the ib_srpt kernel module is loaded. This typically applies to servers configured as SCSI RDMA targets, often found in storage fabrics and high-performance computing environments. The race condition's narrow timing window makes reliable exploitation difficult but not impossible on busy systems.
No public proof-of-concept exploit has been published for this issue, and it is not listed in the CISA Known Exploited Vulnerabilities catalog. The EPSS probability is 0.24%.
See the upstream fix at Kernel Update Commit e362d00 for the exact code change that reorders event handler registration.
Detection Methods for CVE-2024-26872
Indicators of Compromise
- Unexpected kernel oops or panic messages referencing srpt_refresh_port in dmesg or /var/log/kern.log
- KASAN use-after-free warnings on kernels built with CONFIG_KASAN=y
- Unexplained reboots or kernel hangs on hosts running the ib_srpt module with active InfiniBand/RDMA devices
Detection Strategies
- Inventory Linux hosts loading the ib_srpt kernel module using lsmod | grep ib_srpt and compare running kernel versions against patched versions listed in the vendor advisories.
- Audit systems for the presence of InfiniBand or RoCE hardware that could expose the vulnerable code path.
- Monitor kernel ring buffer and syslog for crash signatures referencing SRP target functions.
Monitoring Recommendations
- Centralize kernel log collection and alert on kernel oops events, use-after-free detections, or module load failures involving ib_srpt.
- Track package versions for linux-image-* across the fleet and flag hosts running kernels prior to the patched stable releases.
- Correlate hardware inventory for RDMA-capable NICs with kernel patch status to prioritize remediation.
How to Mitigate CVE-2024-26872
Immediate Actions Required
- Apply the latest stable Linux kernel update that includes the srpt event handler ordering fix.
- For Debian systems, install the kernel updates described in the Debian LTS Announcement June 2024.
- For Siemens industrial products, follow the guidance in Siemens Security Advisory SSA-265688.
- Restrict local shell access and limit which users can interact with RDMA subsystems on affected hosts.
Patch Information
The upstream fix is distributed across multiple stable branches. Reference commits include 6413e78, 7104a00, 85570b9, bdd895e, c21a887, e362d00, and ec77fa1. Install the kernel package appropriate to your distribution and reboot.
Workarounds
- Unload the ib_srpt module where SRP target functionality is not required: modprobe -r ib_srpt.
- Blacklist the module to prevent automatic loading on systems that do not need it.
- Where RDMA target services are mandatory, restrict access to trusted administrators and schedule the kernel patch at the earliest maintenance window.
# Configuration example
# Verify module status
lsmod | grep ib_srpt
# Unload the module if not required
sudo modprobe -r ib_srpt
# Prevent automatic loading until patched
echo "blacklist ib_srpt" | sudo tee /etc/modprobe.d/blacklist-ib_srpt.conf
# Verify installed kernel version against patched stable releases
uname -r
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

