CVE-2026-46053: net: rds: fix MR cleanup on copy error
From: Greg Kroah-Hartman <[email protected]>
Description
===========
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.
The Linux kernel CVE team has assigned CVE-2026-46053 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.6 with commit 0d4597c8c5abdeeaf50774066c16683f30184dc8 and fixed in 6.6.140 with commit 8fdbb6262a4a3ed44a0830a7793903b54bb27bdc Issue introduced in 5.6 with commit 0d4597c8c5abdeeaf50774066c16683f30184dc8 and fixed in 6.12.86 with commit d95cea9298be1ba8876e3f156be96d3a492085ca Issue introduced in 5.6 with commit 0d4597c8c5abdeeaf50774066c16683f30184dc8 and fixed in 6.18.27 with commit 033370ffb3c9c0264d19f8ba9ef769523266589a Issue introduced in 5.6 with commit 0d4597c8c5abdeeaf50774066c16683f30184dc8 and fixed in 7.0.4 with commit b3cb8cae530b2727d8245684148bb49425f6765c Issue introduced in 5.6 with commit 0d4597c8c5abdeeaf50774066c16683f30184dc8 and fixed in 7.1-rc1 with commit 8141a2dc70080eda1aedc0389ed2db2b292af5bd
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-46053
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
net/rds/rdma.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/8fdbb6262a4a3ed44a0830a7793903b54bb27bdc https://git.kernel.org/stable/c/d95cea9298be1ba8876e3f156be96d3a492085ca https://git.kernel.org/stable/c/033370ffb3c9c0264d19f8ba9ef769523266589a https://git.kernel.org/stable/c/b3cb8cae530b2727d8245684148bb49425f6765c https://git.kernel.org/stable/c/8141a2dc70080eda1aedc0389ed2db2b292af5bd