CVE-2026-139113
published critical CVSS 3.1 · 9.8rnbd-srv: fix use-after-free on two CLOSE messages
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux2de6c8de192b9341ffa5e84afe1ce6196d4eef41 to < c47d198faf301278927ae62802626d19c32332d5 · 2de6c8de192b9341ffa5e84afe1ce6196d4eef41 to < d8cb9e9ba95dce0c4731f3c6cf50632fd8540cad · 2de6c8de192b9341ffa5e84afe1ce6196d4eef41 to < 0368a1ebc080e42f5c1c2708c621deae05fdb629 · 2de6c8de192b9341ffa5e84afe1ce6196d4eef41 to < c366173339de0cfcc3cbcaccfbe726459f9f96d4 · 2de6c8de192b9341ffa5e84afe1ce6196d4eef41 to < ccae722c4bc716df8a4cdde462071d034f92f32d · 2de6c8de192b9341ffa5e84afe1ce6196d4eef41 to < 4912dab88baa5f7034dc9e38807804d470ae5438 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux5.8 (affected) · 0 to < 5.8 (unaffected · semver) · 6.1.193 through 6.1.* (unaffected · semver) · 6.6.163 through 6.6.* (unaffected · semver) · 6.12.119 through 6.12.* (unaffected · semver) · 6.18.65 through 6.18.* (unaffected · semver) · 7.3.6 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
Description
In the Linux kernel, the following vulnerability has been resolved: rnbd-srv: fix use-after-free on two CLOSE messages process_msg_close() looks the sess_dev up with a kref, drops it right away, and only then takes the session mutex for the teardown. A session has several connections handled by different workers, so two CLOSE messages for the same ID both finish the lookup before either one tears the sess_dev down, and the second one works on freed memory. Any host that can open a device on the server can do that. Take the mutex first and look the ID up with xa_load() under it. The second CLOSE then finds nothing.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 9.8 / 10
- Severity
- critical
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:N - Two RNBD_MSG_CLOSE messages carrying the same device_id arrive as RTRS RDMA-WRITE-WITH-IMM on two connections of one session; rtrs_srv_rdma_done() -> process_io_req() -> rnbd_srv_rdma_ev() -> process_msg_close(). rtrs_srv_rdma_init() listens with RDMA_PS_TCP on IN6ADDR_ANY port 1234, so RoCEv2/iWARP peers reach it over routable IP. AC:L - The peer sends both CLOSEs. Each connection has its own IB_POLL_WORKQUEUE CQ, so the handlers run concurrently, and an OPEN on a third connection holds srv_sess->lock while both rnbd_get_sess_dev() lookups succeed. A lost race leaves the second lookup at -ENXIO, which is harmless, so the attacker can retry at will. PR:N - rtrs_rdma_connect() and process_info_req() check only RTRS_MAGIC, the version, cid and uuid, with no credentials. process_msg_open() then read-only opens any block device under dev_search_path (default "/"), so an unauthenticated peer gets the device_id it needs for the two CLOSEs. UI:N - The server handles the CLOSE messages in its CQ workqueue as part of normal RTRS operation. No administrator or local user does anything. S:U - The freed rnbd_srv_sess_dev and everything the second teardown touches is memory of the server's own kernel; no VM, IOMMU or sandbox boundary is crossed. C:H - The second process_msg_close() runs rnbd_srv_destroy_dev_session_sysfs() on a kfree'd kmalloc-512 rnbd_srv_sess_dev, reading kobj->sd, parent, kset and ktype from freed memory. If another object refills the slot, those pointers are under attacker influence, which can be groomed into a kernel read. I:H - On the freed object, kobject_del() writes kobj->sd/parent/state and does kobject_put(parent). kobject_put() decrements kobj->kref, and when it reaches zero kobject_cleanup() calls t->release via a ktype pointer loaded from the reclaimed slot: memory corruption plus an indirect call through freed memory. A:H - Even with no slot reuse, the second teardown triggers a refcount-underflow WARN and KASAN use-after-free reports; with the slot reused, it dereferences wild kernfs and kobject pointers and oopses the storage server. An unauthenticated peer can repeat it.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 2de6c8de192b9341ffa5e84afe1ce6196d4eef41 to < c47d198faf301278927ae62802626d19c32332d5 (affected · git)2de6c8de192b9341ffa5e84afe1ce6196d4eef41 to < d8cb9e9ba95dce0c4731f3c6cf50632fd8540cad (affected · git)2de6c8de192b9341ffa5e84afe1ce6196d4eef41 to < 0368a1ebc080e42f5c1c2708c621deae05fdb629 (affected · git)2de6c8de192b9341ffa5e84afe1ce6196d4eef41 to < c366173339de0cfcc3cbcaccfbe726459f9f96d4 (affected · git)2de6c8de192b9341ffa5e84afe1ce6196d4eef41 to < ccae722c4bc716df8a4cdde462071d034f92f32d (affected · git)2de6c8de192b9341ffa5e84afe1ce6196d4eef41 to < 4912dab88baa5f7034dc9e38807804d470ae5438 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 5.8 (affected)0 to < 5.8 (unaffected · semver)6.1.193 through 6.1.* (unaffected · semver)6.6.163 through 6.6.* (unaffected · semver)6.12.119 through 6.12.* (unaffected · semver)6.18.65 through 6.18.* (unaffected · semver)7.3.6 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
6- https://git.kernel.org/stable/c/0368a1ebc080e42f5c1c2708c621deae05fdb629
- https://git.kernel.org/stable/c/4912dab88baa5f7034dc9e38807804d470ae5438
- https://git.kernel.org/stable/c/c366173339de0cfcc3cbcaccfbe726459f9f96d4
- https://git.kernel.org/stable/c/c47d198faf301278927ae62802626d19c32332d5
- https://git.kernel.org/stable/c/ccae722c4bc716df8a4cdde462071d034f92f32d
- https://git.kernel.org/stable/c/d8cb9e9ba95dce0c4731f3c6cf50632fd8540cad
Provider assertions
1Linux · cna
rnbd-srv: fix use-after-free on two CLOSE messages
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- d6c165fe36c134c8c49e7d91c5721aaa7a05f0f0b73a1fa2772717a267a834f0
- Ingested
- 01 Dec 2026, 05:47:22 UTC
- Source record
- Official CVE record