CVE-2026-139112: rnbd-srv: publish the sess_dev at the end of OPEN
In the Linux kernel, the following vulnerability has been resolved:
rnbd-srv: publish the sessdev at the end of OPEN
rnbdsessdevalloc() stores the empty sessdev in the XArray as its first step. An IO message with the new ID from another connection can find it before bdevfile is set, or hold a reference while a failing OPEN frees it after a mere RCU grace period. Both are reachable from any host that can open a device.
Reserve the ID with a NULL entry and store the sessdev once nothing can fail anymore. The error path still erases the ID, and no longer needs synchronizercu().
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In rnbd-srv, reserve the ID with a NULL XArray entry and publish the sess_dev at the end of OPEN, once the operation can no longer fail; keep erasing the ID on the error path.
Event History
Frequently Asked Questions
Who can trigger this issue?
Any host that can open a device can reach the vulnerable OPEN and IO message race. Exploitation requires the ability to use a newly assigned device ID from another connection while OPEN is still in progress or failing.
What failure condition does the fix prevent?
Before the fix, an IO message could find a sess_dev in the XArray before its bdev_file was initialized, or retain a reference to it while a failing OPEN frees it after only an RCU grace period. The fix reserves the ID with a NULL entry and publishes sess_dev only after no further OPEN failures are possible.
What is the relevant mitigation if patching cannot be applied immediately?
Limit device-open access to trusted hosts and prevent untrusted hosts from establishing separate connections that could issue IO using newly assigned device IDs. The provided data does not specify a configuration-only workaround.