KernelScan.io

HIGH

rds MR Double-Free

CVE-2026-46053

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 AI6.1MEDIUM

01

In the Linux kernel, the following vulnerability has been resolved: net: rds: fix MR cleanup on copy error __rds_rdma_map() hands sg/pages ownership to the transport after get_mr() succeeds. If copying the generated cookie back to user space fails after that point, the error path must not free those resources again before dropping the MR reference. Remove the duplicate unpin/free from the put_user() failure branch so that MR teardown is handled only through the existing final cleanup path.

02

Engine v0.2.0

Risk summary

Local users with low privileges can trigger a double-free condition in the RDS RDMA subsystem. The duplicate cleanup of memory region resources corrupts kernel heap metadata and typically results in a kernel panic, leading to denial of service.

Affectednet/rds/rdma.c (RDS RDMA)

Vulnerability analysis

The vulnerability occurs in __rds_rdma_map() where memory region (MR) cleanup is performed twice on the same resources. After get_mr() succeeds, ownership of sg/pages is transferred to the transport layer. However, if put_user() fails when copying the generated cookie back to userspace, the error path incorrectly calls unpin_user_pages() and kfree() on resources already owned by the transport. This creates a double-free and use-after-free condition when the MR reference is later dropped through the normal cleanup path, corrupting heap metadata and causing system instability. The fix removes the duplicate cleanup from the put_user() failure branch so that teardown is handled only through the existing final cleanup path.

03

BranchFixed inPatch commit
5.105.10.25891a44b406bc1
5.155.15.209106dc6892066
6.16.1.175ec55a86f7fba
6.126.12.86d95cea9298be
6.186.18.27033370ffb3c9
6.66.6.1408fdbb6262a4a
7.07.0.4b3cb8cae530b
mainline7.1-rc18141a2dc7008