Skip to contentSkip to conversation

CVE-2026-98964: nvmet: use the local P2P device on metadata allocation failure

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 23

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: use the local P2P device on metadata allocation failure

nvmet_req_alloc_p2pmem_sgls() assigns req->p2p_dev only after the data and metadata SGL allocations succeed. If the data allocation succeeds but the metadata allocation fails, out_free_sg passes req->p2p_dev to pci_p2pmem_free_sgl() before that assignment has taken place.

Pass the local p2p_dev argument instead, so cleanup uses the same PCI device as the successful data allocation.

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

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

	Issue introduced in 5.13 with commit bcd9a0797d73eeff659582f23277e7ab6e5f18f3 and fixed in 6.6.160 with commit 3c231142c4f4bb96836469eb276026ec55940093
	Issue introduced in 5.13 with commit bcd9a0797d73eeff659582f23277e7ab6e5f18f3 and fixed in 6.12.113 with commit 32f21607911a1f69c8f0f93a6c28fe6f8490aa98
	Issue introduced in 5.13 with commit bcd9a0797d73eeff659582f23277e7ab6e5f18f3 and fixed in 6.18.57 with commit ce79a6c5cc1b8054ec8d3eba16adda4a36113438
	Issue introduced in 5.13 with commit bcd9a0797d73eeff659582f23277e7ab6e5f18f3 and fixed in 7.2.11 with commit 73bf0f9579633b531098a475e6e55c9316763aed
	Issue introduced in 5.13 with commit bcd9a0797d73eeff659582f23277e7ab6e5f18f3 and fixed in 7.3 with commit 4aa9c0f377a4de5e8fddce76b34ee4529639a1ff
	Issue introduced in 5.10.43 with commit c440cd080761b18a52cac20f2a42e5da1e3995af
	Issue introduced in 5.12.10 with commit 8a452d62e7cea3c8a2676a3b89a9118755a1a271

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

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/3c231142c4f4bb96836469eb276026ec55940093
	https://git.kernel.org/stable/c/32f21607911a1f69c8f0f93a6c28fe6f8490aa98
	https://git.kernel.org/stable/c/ce79a6c5cc1b8054ec8d3eba16adda4a36113438
	https://git.kernel.org/stable/c/73bf0f9579633b531098a475e6e55c9316763aed
	https://git.kernel.org/stable/c/4aa9c0f377a4de5e8fddce76b34ee4529639a1ff