CVE-2026-139159: Linux kernel NVMe-oF target frees a scatterlist twice when metadata allocation fails over RDMA

ByLinuxtastic

December 3, 2026 #CVE, #Linux Kernel

The NVMe over Fabrics target (nvmet) lets a Linux host serve NVMe namespaces to other machines over RDMA, TCP or Fibre Channel. The kernel CNA record describes a double free in its request setup: “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.” The kernel CNA and Red Hat both score it 8.1, Red Hat rates it Important, and its statement says an unauthenticated remote attacker can reach it on targets that use the RDMA transport. If a host runs an NVMe-oF target over RDMA, upgrade it to a kernel at or above 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.119, 6.18.65 or 7.3.6 and reboot.

CVE-2026-139159 at a glance.

ComponentLinux kernel, the NVMe over Fabrics target core (nvmet.ko, used by nvmet-rdma): nvmet_req_alloc_sgls() in drivers/nvme/target/core.c
Affected versionsmainline 5.8 up to 7.4-rc1 (from commit c6e3f133, “nvmet: add metadata support for block devices”); 5.10.x below 5.10.275, 5.15.x below 5.15.226, 6.1.x below 6.1.193, 6.6.x below 6.6.163, 6.12.x below 6.12.119, 6.18.x below 6.18.65, 7.3.x below 7.3.6. Kernels before 5.8 have no metadata SGLs in the target
Fixed inmainline 7.4-rc1 (commit 2f61b9d1, the one Debian cites) and stable 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.119, 6.18.65, 7.3.6; eight fix commits in the record. The fix replaces one line, sgl_free(req->sg), with nvmet_req_free_sgls(req), which clears the scatterlist pointers and counts before the response cleanup runs
SeverityKernel CNA CVSS 3.1 8.1 (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H), which NVD shows as its only metric; Red Hat Important, 8.1 on the same vector (score marked draft, CWE-1341, multiple releases of the same resource); Ubuntu Medium, no score. The AC:H is the allocation failure the attacker has to bring about; the impacts are the three vendors’ usual reading of a double free in slab memory
Exploited in the wildNot on the CISA KEV catalogue (2026.11.30). EPSS 0.00630 (52nd percentile) on 1 December 2026
Who is exposedHosts that run an NVMe-oF target with the RDMA transport, reachable by a machine that is not trusted: the attacker is any initiator that can reach the port (PR:N), and the trigger is a request whose metadata allocation fails. Red Hat’s statement: an unauthenticated remote attacker “could corrupt kernel memory over RDMA, leading to crash or possible code execution on NVMe targets using RDMA”, and the target and its RDMA transport “are not enabled by default, so systems not configured as RDMA NVMe-over-Fabrics targets are not exposed”. The TCP and FC transports share the core function but the record names the RDMA error completion as the second free
PublishedCVE record 30 November 2026 (kernel CNA, updated 1 December); this page built 2 December 2026, last updated 2 December 2026

What it is

When the target accepts a read or write it builds a scatterlist for the data and, for namespaces formatted with protection information, a second one for the metadata. nvmet_req_alloc_sgls() allocates the data list first and then the metadata list; if the second allocation fails it freed the first with sgl_free() and returned an error, leaving req->sg pointing at memory that no longer belonged to it. The request then went through the transport’s error handling, and the RDMA transport’s completion path, which cleans up every request the same way, called the release helper that frees req->sg again. Two frees of the same slab object, with whatever else the kernel allocated in between, is the classic shape of a double free.

The attacker needs the metadata allocation to fail, which is the AC:H in every vector. Memory pressure on the target is one way; a request shaped so that the metadata list is implausibly large is the other that the record’s wording, “a metadata SGL allocation fails”, leaves open, and Red Hat describes the trigger as “sending RDMA requests that cause a metadata allocation failure”. Either way the party sending the request is an initiator that has connected to the port, and NVMe-oF ports accept connections from any host on the fabric unless the subsystem restricts its allowed hosts, which is why the vendors score it without privileges. What the attacker gets is the argument about double frees: a crash of the target for certain, and possibly a controlled write if the freed object is reallocated between the two frees.

The fix on GitHub, by Avi Weiss and committed by Keith Busch, is a one-line change in drivers/nvme/target/core.c: the failure path calls nvmet_req_free_sgls(req), the helper the cleanup path also uses, which frees the list and zeroes the pointer and count so that the second call finds nothing to free. The commit’s Fixes: tag names the 2020 commit that added metadata support, which is why the range starts at 5.8. git.kernel.org and lore.kernel.org refuse automated readers, so the backports are described from the record and the mainline commit from its GitHub mirror.

Who is affected on Linux

Each row is what the distribution’s own security tracker said on 1 and 2 December 2026; the link in the row is the tracker page, which will be newer than this one. Metadata support reached the target in 5.8, and Red Hat marks RHEL 8, 9 and 10 affected, so this is the rare kernel record of the week that reaches every enterprise kernel.

DistributionStatusFixed package
AlpineNot consulted for this page—
Debianbookworm (6.1.176-1, security 6.1.192-3) vulnerable; trixie (6.12.117-1, security 6.12.118-1) vulnerable; fixed in forky and sid (7.3.6-1); no DSAunstable 7.3.6-1; nothing for trixie or bookworm on 2 December 2026
UbuntuMedium, no Ubuntu CVSS yet; linux needs evaluation in every supported release from 14.04 to 26.10 (no version named); no USNnothing released on 1 December 2026
RHEL, Rocky, Alma, CentOS StreamImportant, 8.1 (bug 2587301, “Denial of service via double-free in NVMe target subsystem”); RHEL 8, 9 and 10 kernel and the RHEL 8 and 9 kernel-rt affected, no errata yet; RHEL 6 and 7 not affected; every OpenShift CoreOS image affectednothing released on 2 December 2026
openSUSE/SLENot consulted: suse.com refused the automated reader on 2 December 2026 (client error, twice)—
Fedora, Arch; self-built kernelsNot consulted; upstream stable versions apply5.10.275 / 5.15.226 / 6.1.193 / 6.6.163 / 6.12.119 / 6.18.65 / 7.3.6 or later

How to check

Three questions, in order: which kernel is running, is the host an NVMe-oF target at all, and does it listen on an RDMA port that untrusted initiators can reach. The third is the precondition; a target that serves only TCP or Fibre Channel is outside the record’s second free, and one whose port is on a fabric of trusted hosts has no attacker.

# 1. the running kernel (compare with the fixed stable version for its series)
uname -r

# 2. is the NVMe-oF target configured at all
lsmod | grep -E '^(nvmet|nvmet_rdma|nvmet_tcp|nvmet_fc)'
ls /sys/kernel/config/nvmet/subsystems/ 2>/dev/null

# 3. the precondition: RDMA ports, and whether any subsystem accepts any host
for p in /sys/kernel/config/nvmet/ports/*; do printf '%s %s %s\n' "$p" "$(cat $p/addr_trtype)" "$(cat $p/addr_traddr)"; done 2>/dev/null
grep -H . /sys/kernel/config/nvmet/subsystems/*/attr_allow_any_host 2>/dev/null
# namespaces with protection information are the ones that take the metadata path
grep -Hs . /sys/kernel/config/nvmet/subsystems/*/namespaces/*/pi_enable 2>/dev/null

A kernel at or above the fixed stable version for its series is done, and a kernel below 5.8 is not in range. A host with no nvmet configuration is not a target. A port whose addr_trtype is rdma is the record’s transport, and a subsystem with attr_allow_any_host set to 1 accepts the connection from anyone who can reach the port, which makes the attacker unauthenticated in practice as well as in the vector. There is no log line that marks an attempt; a successful one is a slab corruption report or an oops in the nvmet_rdma completion path.

How to fix it

Install the fixed kernel and reboot; the target is a set of kernel modules and reconfiguring it does not change the code. Debian forky and sid had the fix out on 2 December; Debian trixie and bookworm, Ubuntu and Red Hat had it pending, and the record lists no mitigation.

# Debian forky / sid (trixie and bookworm once a security update names this CVE)
apt update && apt install linux-image-amd64 && systemctl reboot       # or linux-image-arm64
# Ubuntu, RHEL family, SUSE: when the pending builds land
apt update && apt full-upgrade && systemctl reboot
dnf update kernel && systemctl reboot
zypper patch && systemctl reboot
uname -r
# Until then: restrict who can connect. Name the allowed hosts and turn off allow_any_host
echo 0 > /sys/kernel/config/nvmet/subsystems/<subsys>/attr_allow_any_host
mkdir -p /sys/kernel/config/nvmet/hosts/<initiator-nqn>
ln -s /sys/kernel/config/nvmet/hosts/<initiator-nqn> /sys/kernel/config/nvmet/subsystems/<subsys>/allowed_hosts/
# or take the RDMA port down and serve over TCP until the kernel lands (changes the transport for every initiator)
rm /sys/kernel/config/nvmet/ports/<port>/subsystems/<subsys>

Restricting the allowed hosts is a real mitigation in the sense that it removes the unauthenticated attacker, but a host NQN is a string the initiator presents, not a credential; on a fabric where an untrusted machine can claim a trusted NQN it buys nothing, and the record does not say the path needs an admin queue, so in-band authentication (DH-HMAC-CHAP) may not help either. What not to do: do not conclude from “RDMA error completion” that TCP targets are safe for certain; the first free is in the core function every transport uses, and the record only names the second free it reproduced. And do not treat Red Hat’s “not enabled by default” as not shipped: unlike RNBD, the target modules are in every RHEL kernel, and Red Hat marks RHEL 8, 9 and 10 affected.

Sources

  • CVE-2026-139159 at CVE.org — the kernel CNA record: the commit message with the “frees req->sg without clearing it” and “frees the same scatterlist again” sentences, the git and version ranges, drivers/nvme/target/core.c (30 November 2026, updated 1 December)
  • Fix commits on git.kernel.org: 2f61b9d1 (mainline, 7.4-rc1) and the backports b22d6aa4, 2e8c8c6f, bb5dd429, c07e6802, d998fa25, caaf795e, 5f981beb; git.kernel.org refuses automated readers, so the mainline commit was read on GitHub: Avi Weiss, committed by Keith Busch, Fixes: c6e3f133, core.c +1/−1 (sgl_free(req->sg) becomes nvmet_req_free_sgls(req))
  • NVD entry — Received on 30 November 2026; shows the CNA’s 8.1 as a secondary metric, no NVD score, CWE or CPE on 2 December
  • Distribution trackers: Debian (bookworm and trixie vulnerable, forky and sid fixed in 7.3.6-1) · Ubuntu (Medium; needs evaluation in every release) · Red Hat (Important 8.1, RHEL 8, 9 and 10 affected; bug 2587301) · SUSE (not reachable on 2 December)
  • CISA KEV catalogue 2026.11.30, not listed · EPSS 0.00630 (percentile 0.515) on 1 December 2026

Related reading

This advisory page was assembled from the primary sources listed above on 2 December 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.