Skip to contentSkip to conversation

CVE-2026-72128: nvmet: fix refcount leak in nvmet_sq_create()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Aug 15

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

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

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

nvmet: fix refcount leak in nvmet_sq_create()

In nvmet_sq_create(), a reference on the ctrl is taken via kref_get_unless_zero() before calling nvmet_check_sqid(). If nvmet_check_sqid() fails, the function returns the error directly without releasing the reference, leading to a leak.

Fix this by jumping to the "ctrl_put" label, which already performs the necessary nvmet_ctrl_put(ctrl). This ensures the reference is properly released on this error path.

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

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

	Issue introduced in 6.14 with commit 1eb380caf5275bba1d3d6182dde1fd740f331743 and fixed in 6.18.40 with commit 26355295ce21cb046546085c3a81abe68160a784
	Issue introduced in 6.14 with commit 1eb380caf5275bba1d3d6182dde1fd740f331743 and fixed in 7.1.5 with commit fcef60ed5f714a24104eb021d6397a67955ebeff
	Issue introduced in 6.14 with commit 1eb380caf5275bba1d3d6182dde1fd740f331743 and fixed in 7.2-rc1 with commit 34b9a83c50660148bde01cde16451dbe78369749

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-72128

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/core.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/26355295ce21cb046546085c3a81abe68160a784
	https://git.kernel.org/stable/c/fcef60ed5f714a24104eb021d6397a67955ebeff
	https://git.kernel.org/stable/c/34b9a83c50660148bde01cde16451dbe78369749