CVE-2026-139159
published high CVSS 3.1 · 8.1nvmet: prevent double-free after metadata SGL allocation failure
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxc6e3f13398123a008cd2ee28f93510b113a32791 to < b22d6aa4c956240d6c9a27b743df8548ecd6c3dd · c6e3f13398123a008cd2ee28f93510b113a32791 to < 2e8c8c6ff43ca4cf52c82470e72bd73ddd660b87 · c6e3f13398123a008cd2ee28f93510b113a32791 to < bb5dd42918c62988c734b0017e41c11043c2946c · c6e3f13398123a008cd2ee28f93510b113a32791 to < c07e6802f75e112e82cfacbe01a15fb047ef7284 · c6e3f13398123a008cd2ee28f93510b113a32791 to < d998fa25c4f8d81541f1ae52d39dde9dd343df9b · c6e3f13398123a008cd2ee28f93510b113a32791 to < caaf795ed9946074a8f9154e67053f4cc9cde7e0 · c6e3f13398123a008cd2ee28f93510b113a32791 to < 5f981beb9a8d050a7cabd7184cf4c96643eff9a7 · c6e3f13398123a008cd2ee28f93510b113a32791 to < 2f61b9d1d54edf75a352c43eebe3804144b5d44e · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux5.8 (affected) · 0 to < 5.8 (unaffected · semver) · 5.10.275 through 5.10.* (unaffected · semver) · 5.15.226 through 5.15.* (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 | Pending Fix; Not Affected | Not stated | 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: nvmet: prevent double-free after metadata SGL allocation failure If metadata SGL allocation fails, nvmet_req_alloc_sgls() frees req->sg without clearing it. The RDMA error completion path later frees the same scatterlist again. Use nvmet_req_free_sgls() instead so that the scatterlist pointers and counts are cleared before response cleanup.
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
- 8.1 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:N - nvmet_req_alloc_sgls() is called only from nvmet_rdma_map_sgl_keyed(), reached from nvmet_rdma_handle_command() for an NVMe Read/Write capsule received over RDMA. The remote host's command sets the data length (keyed SGL) and the metadata length (rw.length × PI size). PI needs mlx5 integrity handover, which runs over routable RoCEv2. AC:H - The bug needs the metadata sgl_alloc(GFP_KERNEL) of at most 512KB to fail after the data one succeeded. Order-0 pages and a kmalloc of 8KB or less from a kworker OOM-kill rather than fail, so the host cannot force it. It also needs ctrl->pi_support (port param_pi_enable and subsys attr_pi_enable, both off by default) and an 8-byte PI bdev. PR:N - Before the I/O queue accepts commands, the host only has to pass nvmet_host_allowed() in Connect. That checks allow_any_host or a hostnqn string the host asserts itself, with no authentication unless DH-HMAC-CHAP is configured. This matches the existing nvmet-rdma PI record. UI:N - The remote host sends the Read/Write capsules itself. No action is needed from anyone on the target. S:U - The double free corrupts the target kernel's own page and slab state. No other security authority is crossed. C:H - Between the two frees, the freed data pages and the kmalloc_large scatterlist array page can be reused by the host's next Write buffers. The second sgl_free() then reads host-written bytes as scatterlist entries and frees arbitrary pages, which gives a page use-after-free that can be turned into a read primitive. I:H - nvmet_req_free_sgls() calls __free_pages() on every page in the stale req->sg, then kfree() on the array. Once the host has refilled that memory, it frees live pages or pages the host chose. This is a double free that enables arbitrary write. A:H - Freeing the same pages and scatterlist array twice through sgl_free() causes bad page state, slab freelist corruption or a KASAN double-free oops on the target.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | c6e3f13398123a008cd2ee28f93510b113a32791 to < b22d6aa4c956240d6c9a27b743df8548ecd6c3dd (affected · git)c6e3f13398123a008cd2ee28f93510b113a32791 to < 2e8c8c6ff43ca4cf52c82470e72bd73ddd660b87 (affected · git)c6e3f13398123a008cd2ee28f93510b113a32791 to < bb5dd42918c62988c734b0017e41c11043c2946c (affected · git)c6e3f13398123a008cd2ee28f93510b113a32791 to < c07e6802f75e112e82cfacbe01a15fb047ef7284 (affected · git)c6e3f13398123a008cd2ee28f93510b113a32791 to < d998fa25c4f8d81541f1ae52d39dde9dd343df9b (affected · git)c6e3f13398123a008cd2ee28f93510b113a32791 to < caaf795ed9946074a8f9154e67053f4cc9cde7e0 (affected · git)c6e3f13398123a008cd2ee28f93510b113a32791 to < 5f981beb9a8d050a7cabd7184cf4c96643eff9a7 (affected · git)c6e3f13398123a008cd2ee28f93510b113a32791 to < 2f61b9d1d54edf75a352c43eebe3804144b5d44e (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 5.8 (affected)0 to < 5.8 (unaffected · semver)5.10.275 through 5.10.* (unaffected · semver)5.15.226 through 5.15.* (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
8- https://git.kernel.org/stable/c/2e8c8c6ff43ca4cf52c82470e72bd73ddd660b87
- https://git.kernel.org/stable/c/2f61b9d1d54edf75a352c43eebe3804144b5d44e
- https://git.kernel.org/stable/c/5f981beb9a8d050a7cabd7184cf4c96643eff9a7
- https://git.kernel.org/stable/c/b22d6aa4c956240d6c9a27b743df8548ecd6c3dd
- https://git.kernel.org/stable/c/bb5dd42918c62988c734b0017e41c11043c2946c
- https://git.kernel.org/stable/c/c07e6802f75e112e82cfacbe01a15fb047ef7284
- https://git.kernel.org/stable/c/caaf795ed9946074a8f9154e67053f4cc9cde7e0
- https://git.kernel.org/stable/c/d998fa25c4f8d81541f1ae52d39dde9dd343df9b
Provider assertions
1Linux · cna
nvmet: prevent double-free after metadata SGL allocation failure
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 59ebd15de245a2c2a2be61fa7fa1ce673664eb33e01a4b45931de0b22bc2c3d4
- Ingested
- 01 Dec 2026, 05:47:22 UTC
- Source record
- Official CVE record