Skip to main content
Vulnerability Database/CVE-2026-98360

CVE-2026-98360: Linux Kernel RDMA/rxe Use-After-Free

CVE-2026-98360 is a use-after-free flaw in the Linux kernel RDMA/rxe subsystem affecting multicast group handling. This article covers the technical details, affected versions, and mitigation steps.

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-2026-98360 Overview

CVE-2026-98360 is a use-after-free vulnerability in the Linux kernel's Soft RoCE (RDMA over Converged Ethernet) driver, RDMA/rxe. The flaw resides in rxe_get_mcg(), which publishes a newly allocated multicast group into rxe->mcg_tree before rxe_mcast_add() programs the backing Ethernet multicast address. When rxe_mcast_add() fails, the unwind path frees the published group without removing it from the tree. A later lookup of the same Multicast Group Identifier (MGID) dereferences freed memory in __rxe_lookup_mcg().

Critical Impact

A local userspace Remote Direct Memory Access (RDMA) client can trigger a slab use-after-free in the kernel through an ATTACH_MCAST request on an Unreliable Datagram (UD) Queue Pair (QP), leading to memory corruption and potential privilege escalation.

Affected Products

  • Linux kernel builds with the RDMA/rxe (Soft RoCE) driver enabled
  • Systems exposing /dev/infiniband/rdma_cm or uverbs devices to unprivileged users
  • Distributions shipping affected stable kernel branches referenced in the upstream fix commits

Discovery Timeline

  • 2026-10-06 - CVE-2026-98360 published to the National Vulnerability Database (NVD)
  • 2026-10-07 - Last updated in NVD database

Technical Details for CVE-2026-98360

Vulnerability Analysis

The rxe_get_mcg() function allocates a new rxe_mcg structure and inserts it into the red-black tree rxe->mcg_tree before invoking rxe_mcast_add(). The rxe_mcast_add() call runs outside mcg_lock and programs the backing Ethernet multicast address through dev_mc_add(). If this call returns an error, such as -ENODEV when the underlying netdev was removed, the error-unwind path frees the rxe_mcg object. The object remains linked in mcg_tree, so a subsequent __rxe_lookup_mcg() call for the same MGID returns a dangling pointer. Dereferencing that pointer corrupts the SLAB allocator state and yields exploitable kernel memory conditions. The flaw is classified as a Use After Free [CWE-416].

Root Cause

The root cause is incorrect ordering of state publication relative to resource acquisition. The multicast group is made globally visible before its backing hardware state is successfully programmed. No conditional unwind removes the group from mcg_tree when rxe_mcast_add() fails, so freed memory remains reachable through lookup paths.

Attack Vector

An authenticated local user with access to the RDMA verbs interface opens a UD QP and issues an ATTACH_MCAST request. The attacker forces rxe_mcast_add() to fail, for example by racing netdev removal, which triggers the free of the still-published rxe_mcg. A follow-up attach to the same MGID reaches __rxe_lookup_mcg(), which dereferences the freed structure. Reproduction under Kernel Address Sanitizer (KASAN) reports a slab-use-after-free in __rxe_lookup_mcg().

// No verified exploitation code is published for CVE-2026-98360.
// See the upstream commits for the corrected ordering logic.

Detection Methods for CVE-2026-98360

Indicators of Compromise

  • KASAN kernel log entries reporting slab-use-after-free in __rxe_lookup_mcg or related rxe_mcg call sites
  • Unexpected kernel oops or general protection faults originating from the rdma_rxe module during multicast attach or detach operations
  • Processes repeatedly invoking ATTACH_MCAST ioctls against UD QPs while the backing netdev is being toggled or removed

Detection Strategies

  • Enable KASAN on test and staging kernels to surface use-after-free dereferences in the RDMA subsystem
  • Audit which local users or containers have access to /dev/infiniband/* device nodes and the rdma_rxe driver
  • Correlate netdev removal events with concurrent RDMA multicast operations in system logs

Monitoring Recommendations

  • Collect kernel ring buffer output and system logs centrally and alert on rxe_mcg, __rxe_lookup_mcg, or KASAN strings
  • Monitor loaded kernel modules and flag unexpected loads of rdma_rxe on hosts that do not require Soft RoCE
  • Track process-level ioctl activity against InfiniBand verbs devices from non-privileged accounts

How to Mitigate CVE-2026-98360

Immediate Actions Required

  • Apply the upstream Linux kernel patches that split tree publication into __rxe_publish_mcg() and call rxe_mcast_add() before taking the tree reference
  • If patching is not immediately feasible, unload or blacklist the rdma_rxe module on hosts that do not require Soft RoCE
  • Restrict access to InfiniBand verbs devices so only trusted service accounts can issue ATTACH_MCAST operations

Patch Information

The fix keeps the newly allocated mcg private until rxe_mcast_add() succeeds, then publishes it under mcg_lock. A post-add re-check handles the race where another caller publishes the same MGID concurrently; the losing caller drops its private object and balances its rxe_mcast_add() with rxe_mcast_del(). Corrective commits are available upstream: Linux Kernel Commit 02c0a2fa, Linux Kernel Commit 1caceeb2, Linux Kernel Commit c79a789a, Linux Kernel Commit d4fc4e37, Linux Kernel Commit ddb43ac0, and Linux Kernel Commit faa1fb4c.

Workarounds

  • Blacklist the rdma_rxe module in /etc/modprobe.d/ on systems that do not use Soft RoCE
  • Remove execute or read access to /dev/infiniband/* for unprivileged users and containers
  • Avoid dynamically removing netdevs that back active Soft RoCE multicast groups until the patched kernel is deployed
bash
# Prevent the vulnerable module from loading at boot
echo 'blacklist rdma_rxe' | sudo tee /etc/modprobe.d/blacklist-rdma_rxe.conf
sudo rmmod rdma_rxe 2>/dev/null || true

# Restrict access to InfiniBand verbs devices
sudo chmod 0600 /dev/infiniband/uverbs* 2>/dev/null || true

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.