{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2026-98964",
  "modified": "2026-10-31T05:30:01Z",
  "upstream": [
    "CVE-2026-98964"
  ],
  "published": "2026-10-23T12:29:05Z",
  "summary": "nvmet: use the local P2P device on metadata allocation failure",
  "details": "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.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.191",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-98964"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/eb72e2eeff559eb1eb07b1d644ce2bc1a16c4a80"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/48c8b59429d09a7c3598de425acbc2d3f4e6647b"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/e8f24ae4f45efe6861f801c6ebd2789c9016f1bc"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/3c231142c4f4bb96836469eb276026ec55940093"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/32f21607911a1f69c8f0f93a6c28fe6f8490aa98"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/ce79a6c5cc1b8054ec8d3eba16adda4a36113438"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/73bf0f9579633b531098a475e6e55c9316763aed"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/4aa9c0f377a4de5e8fddce76b34ee4529639a1ff"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-10-30T12:49:54Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.5,
      "cvss_v3_severity": "High",
      "scenario": "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."
    }
  }
}
