CVE-2026-139156: nvme-rdma: fix NULL metadata_sgl dereference with T10-PI
In the Linux kernel, the following vulnerability has been resolved:
nvme-rdma: fix NULL metadatasgl dereference with T10-PI
Since commit 2a8513091d2f ("nvme-rdma: parallelize I/O queue allocation and startup") the I/O tag set is allocated before the I/O queues. nvmerdmainitrequest() only sets req->metadatasgl if queue->pisupport is set, but pisupport is only set later by nvmerdmaallocqueue(), so every I/O request is left with a NULL metadatasgl.
With an RDMA device that supports integrity and a namespace formatted with protection information, nvmerdmadmamapreq() then dereferences the NULL pointer on the first integrity I/O, already during the namespace scan when there is more than one I/O queue.
Queues that a later reconnect adds for the first time have the same problem.
Check queueidx and the controller's maxintegritysegments instead, which is what nvmerdmaallocqueue() derives pisupport from.