KernelScan.io

HIGH Introduced in 4.6

rds FRMR UAF

CVE-2026-98524

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.0HIGH

01

In the Linux kernel, the following vulnerability has been resolved: rds: ib: Clear the sg list when mapping an MR fails rds_ib_map_frmr() stores the caller's scatterlist in the MR before DMA mapping and registration can fail. On failure, __rds_rdma_map() unpins the pages and frees the scatterlist, but rds_ib_free_frmr() can still return the MR to the pool with the stale pointer set. This leaves the pool with a dangling scatterlist and can lead to local privilege escalation. KASAN detects the resulting use-after-free when the MR is later torn down: BUG: KASAN: slab-use-after-free in __rds_ib_teardown_mr Read of size 8 Call Trace: __rds_ib_teardown_mr rds_ib_unreg_frmr rds_ib_flush_mr_pool rds_ib_flush_mrs rds_free_mr rds_setsockopt Store the scatterlist in the MR only after DMA mapping succeeds. If DMA mapping fails, return directly while the MR fields remain clear; the caller keeps ownership of the scatterlist and its pinned pages. If a later registration step fails, unmap the scatterlist and clear the MR fields before returning.

02

Engine v0.9.0

Risk summary

A local unprivileged user can trigger a use-after-free in the RDS InfiniBand fast-registration memory region (FRMR) code by causing a DMA mapping failure during memory registration. This leads to a dangling scatterlist pointer being left in a pooled memory region object, which is later accessed during teardown, enabling potential kernel privilege escalation.

Affectednet/rds/ib_frmr.c (RDS IB Fastreg MR)

Vulnerability analysis

The bug occurs when the RDS IB FRMR driver stores a caller-provided scatterlist in a memory region object before attempting DMA mapping. If the DMA mapping fails, the error path frees the scatterlist but leaves the stale pointer in the pooled object. When that object is later reused and torn down, the kernel accesses the freed scatterlist, creating a use-after-free condition. The fix reorders the code so the scatterlist pointer is only stored after DMA mapping succeeds, and explicitly clears the pointer on any later registration failure. An attacker needs only local access to create an RDS socket and invoke the relevant setsockopt; no special privileges or hardware beyond an RDMA-capable device with FRMR support are required.

03

BranchIntroducedFixed inPatch commit
5.104.65.10.2711be3211e6ac7
5.154.65.15.222c42d316163f8
6.14.66.1.1898dca3c813445
6.124.66.12.1124468df5bcdef
6.184.66.18.55e2ee06162600
6.64.66.6.15849ba5ed01299
7.24.67.2.9b36d32f30c3f
mainline4.67.358eb1b3325ed
cip/5.104.65.10.271-cip781be3211e6ac7
cip/5.10-rt4.65.10.272-cip79-rt351be3211e6ac7
cip/6.14.66.1.189-cip618dca3c813445
cip/6.1-rt4.66.1.189-cip61-rt328dca3c813445
cip/6.124.66.12.112-cip334468df5bcdef

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.112-cip33
cip/6.1Fixed in 6.1.189-cip61
cip/6.1-rtFixed in 6.1.189-cip61-rt32
cip/5.10Fixed in 5.10.271-cip78
cip/5.10-rtFixed in 5.10.272-cip79-rt35
cip/4.19Affected — no CIP fix yet (latest 4.19.325-cip136)
cip/4.19-rtAffected — no CIP fix yet (latest 4.19.325-cip136-rt50)