CVE-2026-143161: net/rds: Do not unpin a page after a failed atomic pin
In the Linux kernel, the following vulnerability has been resolved:
net/rds: Do not unpin a page after a failed atomic pin
rdscmsgatomic() assumes that a non-NULL output from rdspinpages() represents a pin that it owns. However, pinuserpagesfast() can roll back a fast-GUP pin after racing fork() and then fail in the slow path, for example after a concurrent mprotect(PROTNONE). The output slot can still contain the already-unpinned page.
The common error path calls unpinuserpage() on that stale pointer. This can consume another subsystem's pin and allow the page to be freed while it is still in use. A local unprivileged reproducer triggers a KASAN use-after-free write through an iouring registered buffer.
Clear page when rdspinpages() does not return one. The error path continues to release the page on errors after a successful pin, and successful requests retain their existing ownership and behavior. All four RDS atomic ancillary operations share this path.
The issue was found by an LLM.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.10.276 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.227 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.120 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.66 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.7
Event History
Frequently Asked Questions
Who can trigger this issue?
A local unprivileged user can trigger it. Exploitation depends on a race involving RDS page pinning, such as fork() racing with pinning followed by a concurrent mprotect(PROT_NONE) transition.
Which functionality is affected?
All four RDS atomic ancillary operations share the affected path. The problem occurs when page pinning fails after a fast pin has been rolled back, leaving a stale page pointer for the error path.
What is the security impact of a successful trigger?
The stale pointer can cause an extra unpin of a page no longer owned by RDS, potentially consuming another subsystem's pin. This can allow the page to be freed while still in use, resulting in a use-after-free; the reported reproducer produced a KASAN use-after-free write through an io_uring registered buffer.
What should be changed to remediate the issue?
Use a kernel containing the fix that clears the page output when rds_pin_pages() does not return a page. The referenced stable commits contain the resolved change.