Description
In the Linux kernel, the following vulnerability has been resolved: nvme-fabrics: reset io_queues before computing the queue mapping nvmf_set_io_queues only sets the io_queues entries of the queue types it hands out, but the array is reused on every reconnect. When the controller grants fewer queues on a reconnect, stale entries survive and nvmf_map_queues maps CPUs to hardware contexts that don't exist anymore, which crashes blk_mq_map_swqueue with a NULL pointer dereference. E.g. with nr_io_queues=8, nr_write_queues=8 and nr_poll_queues=8, 24 queues are mapped 8/8/8 (default/read/poll). If the controller grants only 16 queues on the reconnect, the poll map still starts at hardware context 16. Clear the array before computing the new mapping.
Affected products and versions
References
- git.kernel.org/stable/c/94498c0363440da72de04cd8a3bff6465f4f4886
- git.kernel.org/stable/c/8bf33026231edefd87bbedbf21f4cf57924732ee
- git.kernel.org/stable/c/7cd360c2fb439e60c777c00f2d49e6bbecbe83b0
- git.kernel.org/stable/c/2cde8f0ce90d3b78e74c6aed54c22374505552d2
- git.kernel.org/stable/c/0402ae823759c4dc695596f00a039dfd078b2e37
- git.kernel.org/stable/c/9588769af5fc8ac12290d48ce1014a78916681fc
Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.