CVE-2026-64534: nvmet-tcp: check INIT_FAILED before nvmet_req_uninit in digest error path

Greg Kroah-Hartman <[email protected]> Mon, 27 Jul 2026 08:32:33 +0200
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026072734-CVE-2026-64534-434b@gregkh>
From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

nvmet-tcp: check INIT_FAILED before nvmet_req_uninit in digest error path

In nvmet_tcp_try_recv_ddgst(), when a data digest mismatch is detected,
nvmet_req_uninit() is called unconditionally. However, if the command
arrived via the nvmet_tcp_handle_req_failure() path, nvmet_req_init()
had returned false and percpu_ref_tryget_live() was never executed. The
unconditional percpu_ref_put() inside nvmet_req_uninit() then causes a
refcount underflow, leading to a WARNING in
percpu_ref_switch_to_atomic_rcu, a use-after-free diagnostic, and
eventually a permanent workqueue deadlock.

Check cmd->flags & NVMET_TCP_F_INIT_FAILED before calling
nvmet_req_uninit(), matching the existing pattern in
nvmet_tcp_execute_request().

The Linux kernel CVE team has assigned CVE-2026-64534 to this issue.


Affected and fixed versions
===========================

	Fixed in 5.10.261 with commit 22ec7a9fe9153d2737ee9b2fa6d2e43a1491decf
	Fixed in 5.15.212 with commit ba35b1c674ca3841c0dfadd698f2c1b3ec542d4e
	Fixed in 6.1.178 with commit c7874dad84b20433c0fe3919f291a762d40de08b
	Fixed in 6.6.145 with commit e602c93b25bda4a9d0ff1791a4bdbfdcbb074af1
	Fixed in 6.12.97 with commit d306da8833e75f669d93424fd84940236f3850bc
	Fixed in 6.18.40 with commit 2ed3c9d955e8cd6361f130623baa664a75fb345f
	Fixed in 7.1 with commit 4606467a75cfc16721937272ed29462a750b60c8

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2026-64534
will be updated if fixes are backported, please check that for the most
up to date information about this issue.


Affected files
==============

The file(s) affected by this issue are:
	drivers/nvme/target/tcp.c


Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/22ec7a9fe9153d2737ee9b2fa6d2e43a1491decf
	https://git.kernel.org/stable/c/ba35b1c674ca3841c0dfadd698f2c1b3ec542d4e
	https://git.kernel.org/stable/c/c7874dad84b20433c0fe3919f291a762d40de08b
	https://git.kernel.org/stable/c/e602c93b25bda4a9d0ff1791a4bdbfdcbb074af1
	https://git.kernel.org/stable/c/d306da8833e75f669d93424fd84940236f3850bc
	https://git.kernel.org/stable/c/2ed3c9d955e8cd6361f130623baa664a75fb345f
	https://git.kernel.org/stable/c/4606467a75cfc16721937272ed29462a750b60c8