HIGH Introduced in 5.13
nvmet P2PDev Deref
CVE-2026-98964
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
KernelScan AI7.1HIGH
01Description
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.
02KernelScan AI Analysis
Risk summary
An NVMe target (nvmet) exposed over a network fabric (NVMe/TCP, NVMe/RDMA, or NVMe/FC) can be crashed by a remote attacker who sends I/O requests that trigger peer-to-peer (P2P) memory allocation where the data buffer succeeds but the metadata buffer fails. The cleanup path dereferences an uninitialized P2P device pointer, causing a kernel BUG and system panic. No authentication or local privileges are required on the target machine.
Vulnerability analysis
The NVMe target's peer-to-peer memory allocation routine records which PCI device provided the memory only after both the data and metadata buffers are successfully reserved. If the data reservation succeeds but the metadata reservation fails, the error cleanup path mistakenly passes an uninitialized (NULL) device pointer to the PCI subsystem's free routine, triggering a kernel panic. The fix ensures the cleanup path uses the device pointer from the successful data allocation instead of the uninitialized field. Any remote initiator that can send NVMe commands to a target configured with peer-to-peer memory can trigger this by crafting requests that exhaust the metadata portion of the P2P pool while leaving room for the data portion.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 5.10.43 | 5.10.273 | eb72e2eeff55 |
| 5.12 | 5.12.10 | 5.13 | 48c8b59429d0 |
| 5.15 | 5.13 | 5.15.224 | e8f24ae4f45e |
| 6.1 | 5.13 | 6.1.191 | 3c231142c4f4 |
| 6.12 | 5.13 | 6.12.113 | ce79a6c5cc1b |
| 6.18 | 5.13 | 6.18.57 | 73bf0f957963 |
| 6.6 | 5.13 | 6.6.160 | 32f21607911a |
| 7.2 | 5.13 | 7.2.11 | 4aa9c0f377a4 |
| mainline | 5.13 | 7.3 | — |
| cip/6.12 | 5.13 | 6.12.114-cip34 | 32f21607911a |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.114-cip34 |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.190-cip62) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |
| cip/5.10 | Affected — no CIP fix yet (latest 5.10.272-cip79) |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.272-cip79-rt35) |