KernelScan.io

HIGH Introduced in 4.10

qla2xxx QueueCount Overflow

CVE-2026-89856

CVSS 8.4 / 10.0 NVD

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

KernelScan AI4.5MEDIUM

01

In the Linux kernel, the following vulnerability has been resolved: scsi: qla2xxx: Clamp MSI-X derived queue counts to avoid truncation ha->msix_count is u16, but ha->max_req_queues, ha->max_rsp_queues and ha->max_qpairs are u8. Deriving the queue count as "ha->max_req_queues = ha->msix_count - 1" therefore truncates: a board (or a misconfigured/malicious hot-plugged device) advertising 257 MSI-X vectors yields msix_count - 1 == 256, which truncates to 0. An MSI-X count of 1 zeroes it as well, and in target mode the subsequent "ha->max_req_queues--" then underflows 0 to 255. When the count is 0, qla2x00_alloc_queues() calls kzalloc_objs(struct req_que *, 0), which returns ZERO_SIZE_PTR. That is not NULL, so the allocation check passes and the following "ha->req_q_map[0] = req" dereferences ZERO_SIZE_PTR, corrupting memory or crashing the kernel. Add qla_calc_queue_count() to clamp the derived value into [1, QLA_MAX_QUEUES - 1] so it always fits in u8 and is never zero, and use it at all three derivation sites (qla25xx_iospace_config(), qla83xx_iospace_config() and qla24xx_enable_msix()). Also guard the target-mode decrement so it cannot reintroduce a zero (which would in turn underflow max_qpairs).

02

Engine v0.6.0

Risk summary

A malicious or misconfigured QLogic Fibre Channel HBA advertising an unusual MSI-X vector count (257 or 1) triggers an integer truncation in the qla2xxx driver, causing a zero-size allocation to be dereferenced as a valid pointer and corrupting memory or crashing the kernel. Systems with QLogic FC HBAs in accessible PCIe slots are at risk; no software privileges are required beyond access to the device. The fix clamps the derived queue count to a safe non-zero range.

Affecteddrivers/scsi/qla2xxx/qla_os.c (qla2xxx SCSI driver)

Vulnerability analysis

The qla2xxx driver derives hardware queue counts by subtracting one from the device's reported MSI-X vector count, but stores the result in a narrower integer type than the source. When a device advertises 257 MSI-X vectors (or only 1), the arithmetic truncates to zero, causing a zero-size memory allocation that returns a special non-NULL sentinel pointer. The driver treats this pointer as valid and writes through it, corrupting memory or crashing the kernel. In target mode, a subsequent decrement can also underflow zero to 255, producing an absurdly large queue count. The fix introduces a helper that clamps the queue count to a valid non-zero range that always fits in the destination type, and guards the target-mode decrement against reintroducing a zero. The vulnerability is reachable from a malicious or misconfigured QLogic Fibre Channel HBA that is present in or hot-plugged into a PCIe slot; no software privileges are required, only access to the hardware.

03

BranchIntroducedFixed inPatch commit
5.104.105.10.270cf623d32761b
5.154.105.15.2219eeddbeaa896
6.14.106.1.188802068b9b683
6.124.106.12.1102efe50b2da82
6.184.106.18.517a448f5ed0b2
6.64.106.6.157e80adfeac61b
7.24.107.2.533c77254e6e9
mainline4.107.3ebfd35c64433
cip/5.104.105.10.271-cip78cf623d32761b
cip/6.14.106.1.189-cip61802068b9b683
cip/6.1-rt4.106.1.189-cip61-rt32802068b9b683
cip/6.124.106.12.111-cip322efe50b2da82

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.111-cip32
cip/6.1Fixed in 6.1.189-cip61
cip/6.1-rtFixed in 6.1.189-cip61-rt32
cip/5.10Fixed in 5.10.271-cip78
cip/5.10-rtAffected — no CIP fix yet (latest 5.10.268-cip77-rt34)
cip/4.19Affected — no CIP fix yet (latest 4.19.325-cip136)
cip/4.19-rtAffected — no CIP fix yet (latest 4.19.325-cip136-rt50)