{"id":"CVE-2026-98964","state":"PUBLISHED","title":"nvmet: use the local P2P device on metadata allocation failure","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmet: use the local P2P device on metadata allocation failure\n\nnvmet_req_alloc_p2pmem_sgls() assigns req->p2p_dev only after the data\nand metadata SGL allocations succeed. If the data allocation succeeds\nbut the metadata allocation fails, out_free_sg passes req->p2p_dev to\npci_p2pmem_free_sgl() before that assignment has taken place.\n\nPass the local p2p_dev argument instead, so cleanup uses the same PCI\ndevice as the successful data allocation.","publishedAt":"2026-10-23T12:19:32.374Z","updatedAt":"2026-10-30T12:40:32.519Z","severity":{"score":7.5,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c440cd080761b18a52cac20f2a42e5da1e3995af","status":"affected","lessThan":"eb72e2eeff559eb1eb07b1d644ce2bc1a16c4a80","versionType":"git"},{"version":"bcd9a0797d73eeff659582f23277e7ab6e5f18f3","status":"affected","lessThan":"48c8b59429d09a7c3598de425acbc2d3f4e6647b","versionType":"git"},{"version":"bcd9a0797d73eeff659582f23277e7ab6e5f18f3","status":"affected","lessThan":"e8f24ae4f45efe6861f801c6ebd2789c9016f1bc","versionType":"git"},{"version":"bcd9a0797d73eeff659582f23277e7ab6e5f18f3","status":"affected","lessThan":"3c231142c4f4bb96836469eb276026ec55940093","versionType":"git"},{"version":"bcd9a0797d73eeff659582f23277e7ab6e5f18f3","status":"affected","lessThan":"32f21607911a1f69c8f0f93a6c28fe6f8490aa98","versionType":"git"},{"version":"bcd9a0797d73eeff659582f23277e7ab6e5f18f3","status":"affected","lessThan":"ce79a6c5cc1b8054ec8d3eba16adda4a36113438","versionType":"git"},{"version":"bcd9a0797d73eeff659582f23277e7ab6e5f18f3","status":"affected","lessThan":"73bf0f9579633b531098a475e6e55c9316763aed","versionType":"git"},{"version":"bcd9a0797d73eeff659582f23277e7ab6e5f18f3","status":"affected","lessThan":"4aa9c0f377a4de5e8fddce76b34ee4529639a1ff","versionType":"git"},{"version":"8a452d62e7cea3c8a2676a3b89a9118755a1a271","status":"affected","versionType":"git"},{"version":"5.10.43","status":"affected","lessThan":"5.10.273","versionType":"semver"},{"version":"5.12.10","status":"affected","lessThan":"5.13","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/target/core.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.13","versionType":"semver"},{"version":"5.10.273","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.224","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.113","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.57","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.11","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/target/core.c"]}],"references":["https://git.kernel.org/stable/c/eb72e2eeff559eb1eb07b1d644ce2bc1a16c4a80","https://git.kernel.org/stable/c/48c8b59429d09a7c3598de425acbc2d3f4e6647b","https://git.kernel.org/stable/c/e8f24ae4f45efe6861f801c6ebd2789c9016f1bc","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"],"weaknesses":[],"ingestedAt":"2026-10-30T13:00:06.648Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/98xxx/CVE-2026-98964.json","commit":"cb14bf1b43b0c9f05f7f40eae2246263fd430780","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-98964","state":"PUBLISHED","datePublished":"2026-10-23T12:19:32.374Z","dateUpdated":"2026-10-30T12:40:32.519Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-25T10:25:14.383Z"},"containers":{"cna":{"title":"nvmet: use the local P2P device on metadata allocation failure","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmet: use the local P2P device on metadata allocation failure\n\nnvmet_req_alloc_p2pmem_sgls() assigns req->p2p_dev only after the data\nand metadata SGL allocations succeed. If the data allocation succeeds\nbut the metadata allocation fails, out_free_sg passes req->p2p_dev to\npci_p2pmem_free_sgl() before that assignment has taken place.\n\nPass the local p2p_dev argument instead, so cleanup uses the same PCI\ndevice as the successful data allocation."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c440cd080761b18a52cac20f2a42e5da1e3995af","status":"affected","lessThan":"eb72e2eeff559eb1eb07b1d644ce2bc1a16c4a80","versionType":"git"},{"version":"bcd9a0797d73eeff659582f23277e7ab6e5f18f3","status":"affected","lessThan":"48c8b59429d09a7c3598de425acbc2d3f4e6647b","versionType":"git"},{"version":"bcd9a0797d73eeff659582f23277e7ab6e5f18f3","status":"affected","lessThan":"e8f24ae4f45efe6861f801c6ebd2789c9016f1bc","versionType":"git"},{"version":"bcd9a0797d73eeff659582f23277e7ab6e5f18f3","status":"affected","lessThan":"3c231142c4f4bb96836469eb276026ec55940093","versionType":"git"},{"version":"bcd9a0797d73eeff659582f23277e7ab6e5f18f3","status":"affected","lessThan":"32f21607911a1f69c8f0f93a6c28fe6f8490aa98","versionType":"git"},{"version":"bcd9a0797d73eeff659582f23277e7ab6e5f18f3","status":"affected","lessThan":"ce79a6c5cc1b8054ec8d3eba16adda4a36113438","versionType":"git"},{"version":"bcd9a0797d73eeff659582f23277e7ab6e5f18f3","status":"affected","lessThan":"73bf0f9579633b531098a475e6e55c9316763aed","versionType":"git"},{"version":"bcd9a0797d73eeff659582f23277e7ab6e5f18f3","status":"affected","lessThan":"4aa9c0f377a4de5e8fddce76b34ee4529639a1ff","versionType":"git"},{"version":"8a452d62e7cea3c8a2676a3b89a9118755a1a271","status":"affected","versionType":"git"},{"version":"5.10.43","status":"affected","lessThan":"5.10.273","versionType":"semver"},{"version":"5.12.10","status":"affected","lessThan":"5.13","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/target/core.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.13","versionType":"semver"},{"version":"5.10.273","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.224","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.113","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.57","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.11","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/target/core.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/eb72e2eeff559eb1eb07b1d644ce2bc1a16c4a80"},{"url":"https://git.kernel.org/stable/c/48c8b59429d09a7c3598de425acbc2d3f4e6647b"},{"url":"https://git.kernel.org/stable/c/e8f24ae4f45efe6861f801c6ebd2789c9016f1bc"},{"url":"https://git.kernel.org/stable/c/3c231142c4f4bb96836469eb276026ec55940093"},{"url":"https://git.kernel.org/stable/c/32f21607911a1f69c8f0f93a6c28fe6f8490aa98"},{"url":"https://git.kernel.org/stable/c/ce79a6c5cc1b8054ec8d3eba16adda4a36113438"},{"url":"https://git.kernel.org/stable/c/73bf0f9579633b531098a475e6e55c9316763aed"},{"url":"https://git.kernel.org/stable/c/4aa9c0f377a4de5e8fddce76b34ee4529639a1ff"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","baseScore":7.5,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - An NVMe/RDMA I/O capsule received by nvmet_rdma_recv_done() supplies the keyed-SGL length and RW NLB; nvmet_rdma_handle_command() -> nvmet_req_init() -> nvmet_bdev_parse_io_cmd() -> nvmet_rdma_map_sgl_keyed() -> nvmet_req_alloc_sgls() reaches patched nvmet_req_alloc_p2pmem_sgls(). The RDMA_PS_TCP listener binds IPv4/IPv6, so it is network-reachable.\nAC:L - On a P2P/PI-enabled target, nvmet_bdev_parse_io_cmd() derives metadata_len from cmd->rw.length, while nvmet_rdma_map_sgl_keyed() copies the capsule's SGL length into transfer_len. The peer can use chosen lengths and concurrent requests to consume the finite P2P pool until data allocation succeeds and metadata allocation fails, without an uncontrolled race.\nPR:N - nvmet_alloc_ctrl() accepts a peer through nvmet_host_allowed() when allow_any_host is set; nvmet_setup_auth() then skips DH-HMAC-CHAP, and nvmet_check_auth_status() permits I/O. The remote initiator therefore needs no credential or local privilege.\nUI:N - After the target is listening, the peer alone establishes its queues and sends metadata I/O capsules handled by nvmet_rdma_recv_done(); no victim action is needed to reach nvmet_req_alloc_p2pmem_sgls().\nS:U - nvmet_req_alloc_p2pmem_sgls() faults while freeing target-kernel memory; it does not cross a VM, IOMMU, or other security-authority boundary.\nC:N - nvmet_rdma_rsp storage is zero-initialized and normal nvmet_req_free_sgls() clears req->p2p_dev; on metadata failure, nvmet_req_alloc_p2pmem_sgls() passes that still-NULL field to pci_p2pmem_free_sgl(). The resulting NULL dereference exposes no memory.\nI:N - pci_free_p2pmem() faults while evaluating pdev->p2pdma with pdev equal to NULL, before gen_pool_free_owner() can alter the pool. This is not an out-of-bounds write, use-after-free, or other attacker-controlled modification primitive.\nA:H - nvmet_req_alloc_p2pmem_sgls() invokes pci_p2pmem_free_sgl() with a NULL device when the controlled data-success/metadata-failure split occurs; pci_free_p2pmem() then causes a kernel NULL-pointer oops or panic, taking down the target host."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-30T12:40:32.519Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10.43","versionEndExcluding":"5.10.273"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"5.15.224"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"6.1.191"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"6.6.160"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"6.12.113"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"6.18.57"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"7.2.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"7.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.12.10"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}