CVE-2026-98154 PUBLISHED

nvme-rdma: fix -EIO cleanup order in queue_rq

Assigner: Linux
Reserved: 25.09.2026 Published: 25.09.2026 Updated: 25.09.2026

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

nvme-rdma: fix -EIO cleanup order in queue_rq

On -EIO, the RDMA queue_rq path reports a host path error and then still cleans up the command and unmaps the SQE DMA. The path error helper completes the request, so that is double cleanup and DMA unmap after the request is already complete.

Unmap the SQE first, then report the host path error. Skip the outer command cleanup on that path.

Metrics

CVSS Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 7

AV:L - The bug is in the -EIO error path of nvme_rdma_queue_rq(), reached when a local user submits block I/O to an nvme-rdma namespace. The -EIO comes from ib_dma_map_sg() failing in nvme_rdma_dma_map_req() or from the HCA's internal-error state in ib_post_send(). The NVMe-oF target sends no data that causes it, so the vector is local. AC:H - The path needs a DMA mapping failure or an mlx4/mlx5 HCA in MLX*_DEVICE_STATE_INTERNAL_ERROR, which the attacker can't cause on demand. Turning the second nvme_cleanup_cmd()/sqe unmap into corruption also needs the freed tag to be reused (for example by a discard with RQF_SPECIAL_PAYLOAD) between completion and the stale cleanup. PR:L - The attacker only needs to issue ordinary I/O, including discards, to a filesystem or block device backed by an nvme-rdma namespace. An unprivileged user with write access can do that. Setting up the NVMe-oF connection is an admin step the attacker does not need to perform. UI:N - No victim action is needed; the attacker's own I/O submissions drive nvme_rdma_queue_rq() into the failing path. S:U - The corruption hits host kernel memory and the host's own DMA mappings, inside the kernel's security authority. No guest, IOMMU or sandbox boundary is crossed. C:H - nvme_host_path_error() completes the request and may free its tag. The later nvme_cleanup_cmd() can then kfree() the special_vec range buffer of a request that reused the tag (a use-after-free), and ib_dma_unmap_single() can tear down another request's sqe mapping. Both are memory-corruption primitives that could leak data. I:H - Freeing a live discard range buffer and unmapping a reused request's command DMA mapping lets freed memory be reallocated while the HCA or driver still uses it. That can corrupt kernel heap objects or change the NVMe command sent to the target. A:H - The double cleanup of a completed or requeued request can cause a double kfree, a DMA-unmap fault or a KASAN/oops, which crashes the host kernel.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 62eca39722fd997e3621fc903229917b9f0fb271 to a41e7fc8d244d9cfc6273051aed85b67adedbb89 (excl.)
  • affected from 62eca39722fd997e3621fc903229917b9f0fb271 to cf3e706963ffbd3ee2568fa0d08ab016f0575ea8 (excl.)
  • affected from 62eca39722fd997e3621fc903229917b9f0fb271 to 171b993a4aed9889159df4815b6a6ba141e61975 (excl.)
  • affected from 62eca39722fd997e3621fc903229917b9f0fb271 to d61828199c6cb4b76d48403c77023cd4bb9d09fc (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 5.12 is affected
  • unaffected from 0 to 5.12 (excl.)
  • unaffected from 6.12.111 to 6.12.* (incl.)
  • unaffected from 6.18.53 to 6.18.* (incl.)
  • unaffected from 7.2.7 to 7.2.* (incl.)
  • unaffected from 7.3-rc2 to * (incl.)

References