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-98524 Overview
CVE-2026-98524 is a use-after-free vulnerability in the Linux kernel's Reliable Datagram Sockets (RDS) over InfiniBand (IB) implementation. The flaw resides in rds_ib_map_frmr(), which stored the caller's scatterlist pointer in a Memory Region (MR) before DMA mapping and registration completed. When mapping failed, __rds_rdma_map() unpinned pages and freed the scatterlist, but rds_ib_free_frmr() returned the MR to the pool holding a dangling pointer. Later teardown dereferenced the stale pointer, triggering a Kernel Address Sanitizer (KASAN) slab-use-after-free in __rds_ib_teardown_mr. The condition can lead to local privilege escalation on affected kernels.
Critical Impact
Local attackers with the ability to invoke RDS socket options on an RDMA-capable system can trigger a use-after-free in kernel memory, enabling potential local privilege escalation.
Affected Products
- Linux kernel versions containing the vulnerable rds_ib_map_frmr() logic in net/rds/ib_frmr.c
- Distributions shipping Linux kernels with the RDS over InfiniBand (CONFIG_RDS_RDMA) module enabled
- Systems with RDMA/InfiniBand hardware or software-emulated RDMA transports
Discovery Timeline
- 2026-10-18 - CVE-2026-98524 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-98524
Vulnerability Analysis
The vulnerability is a use-after-free [CWE-416] in the RDS InfiniBand Fast Registration Memory Region (FRMR) code path. The function rds_ib_map_frmr() is responsible for mapping a user-supplied scatterlist into a hardware MR for RDMA operations. The original implementation assigned the scatterlist pointer to the MR structure before DMA mapping and HCA registration completed successfully.
If DMA mapping or registration failed, the caller path __rds_rdma_map() would unpin the user pages and free the scatterlist. However, the MR retained the now-freed pointer. When rds_ib_free_frmr() returned the MR to the per-pool free list, the dangling scatterlist reference persisted. Subsequent teardown through rds_ib_flush_mr_pool() and __rds_ib_teardown_mr() dereferenced freed slab memory, as confirmed by KASAN.
Root Cause
The root cause is improper ordering of state assignment and error handling. The MR took ownership of the scatterlist pointer before any failure point in the mapping and registration sequence. Failure paths did not clear the MR fields, allowing a freed pointer to escape into pooled kernel state.
Attack Vector
Exploitation requires local access and the ability to open an RDS socket and invoke setsockopt() operations that reach __rds_rdma_map(). The attacker races or forces a DMA mapping failure to leave a stale scatterlist in a pooled MR. Later socket release via rds_free_mr() flushes the MR pool and triggers the use-after-free in __rds_ib_teardown_mr(), which can be shaped into a local privilege escalation primitive. Refer to the upstream commits listed under Patch Information for the fix details.
Detection Methods for CVE-2026-98524
Indicators of Compromise
- KASAN reports showing slab-use-after-free in __rds_ib_teardown_mr in kernel logs
- Call traces including rds_ib_unreg_frmr, rds_ib_flush_mr_pool, rds_ib_flush_mrs, rds_free_mr, and rds_setsockopt
- Unexpected kernel oops or panics originating from the net/rds/ib_frmr.c subsystem
Detection Strategies
- Enable KASAN on test and staging kernels to surface use-after-free conditions in the RDS/IB path
- Monitor dmesg and journald for kernel BUG messages referencing RDS or FRMR functions
- Audit running kernel versions against the fixed commits published on kernel.org to identify unpatched hosts
Monitoring Recommendations
- Alert on loading of the rds and rds_rdma kernel modules on hosts that do not require RDMA
- Track setsockopt() activity on AF_RDS sockets through audit subsystem rules
- Collect kernel crash dumps centrally and correlate stack traces that reference __rds_ib_teardown_mr
How to Mitigate CVE-2026-98524
Immediate Actions Required
- Apply the upstream Linux kernel patches referenced below as soon as distribution builds are available
- Blacklist the rds and rds_rdma modules on systems that do not use RDS over InfiniBand
- Restrict local account creation and limit shell access on RDMA-capable hosts to reduce exposure
Patch Information
The fix stores the scatterlist in the MR only after DMA mapping succeeds. On failure, the function returns while MR fields remain clear and the caller retains ownership of the scatterlist and its pinned pages. If a later registration step fails, the scatterlist is unmapped and the MR fields are cleared before return. Patches are available in the following upstream commits:
- Kernel Git Commit 1be3211
- Kernel Git Commit 4468df5
- Kernel Git Commit 49ba5ed
- Kernel Git Commit 58eb1b3
- Kernel Git Commit 8dca3c8
- Kernel Git Commit b36d32f
- Kernel Git Commit c42d316
- Kernel Git Commit e2ee061
Workarounds
- Prevent RDS module autoloading by adding install rds /bin/true to a modprobe configuration file
- Unload the rds module on hosts where it is loaded but unused via modprobe -r rds_rdma rds
- Enforce least privilege and SELinux or AppArmor policies that restrict access to AF_RDS sockets
# Configuration example: disable the RDS modules on hosts that do not need them
echo 'install rds /bin/true' | sudo tee /etc/modprobe.d/blacklist-rds.conf
echo 'install rds_rdma /bin/true' | sudo tee -a /etc/modprobe.d/blacklist-rds.conf
sudo modprobe -r rds_rdma rds 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

