CVE-2021-46964
Severity CVSS v4.0:
Pending analysis
Type:
CWE-476
NULL Pointer Dereference
Publication date:
27/02/2024
Last modified:
08/01/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
scsi: qla2xxx: Reserve extra IRQ vectors<br />
<br />
Commit a6dcfe08487e ("scsi: qla2xxx: Limit interrupt vectors to number of<br />
CPUs") lowers the number of allocated MSI-X vectors to the number of CPUs.<br />
<br />
That breaks vector allocation assumptions in qla83xx_iospace_config(),<br />
qla24xx_enable_msix() and qla2x00_iospace_config(). Either of the functions<br />
computes maximum number of qpairs as:<br />
<br />
ha->max_qpairs = ha->msix_count - 1 (MB interrupt) - 1 (default<br />
response queue) - 1 (ATIO, in dual or pure target mode)<br />
<br />
max_qpairs is set to zero in case of two CPUs and initiator mode. The<br />
number is then used to allocate ha->queue_pair_map inside<br />
qla2x00_alloc_queues(). No allocation happens and ha->queue_pair_map is<br />
left NULL but the driver thinks there are queue pairs available.<br />
<br />
qla2xxx_queuecommand() tries to find a qpair in the map and crashes:<br />
<br />
if (ha->mqenable) {<br />
uint32_t tag;<br />
uint16_t hwq;<br />
struct qla_qpair *qpair = NULL;<br />
<br />
tag = blk_mq_unique_tag(cmd->request);<br />
hwq = blk_mq_unique_tag_to_hwq(tag);<br />
qpair = ha->queue_pair_map[hwq]; #
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.11.20 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.12 (including) | 5.12.3 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/0f86d66b38501e3ac66cf2d9f9f8ad6838bad0e6
- https://git.kernel.org/stable/c/4ecd42dec858b6632c5f024fe13e9ad6c30f2734
- https://git.kernel.org/stable/c/f02d4086a8f36a0e1aaebf559b54cf24a177a486
- https://git.kernel.org/stable/c/0f86d66b38501e3ac66cf2d9f9f8ad6838bad0e6
- https://git.kernel.org/stable/c/4ecd42dec858b6632c5f024fe13e9ad6c30f2734
- https://git.kernel.org/stable/c/f02d4086a8f36a0e1aaebf559b54cf24a177a486



