CVE-2026-89845: scsi: qla2xxx: Avoid req_q_map double-read in qla2x00_error_entry()
In the Linux kernel, the following vulnerability has been resolved:
scsi: qla2xxx: Avoid reqqmap double-read in qla2x00errorentry()
qla2x00errorentry() reads ha->reqqmap[que] twice: once for the NULL check and again when assigning it to req. The map slot is cleared by qla25xxfreereqque() (ha->reqqmap[queid] = NULL under mqlock) during queue teardown, while the response-queue interrupt that drives qla2x00errorentry() is still registered (the IRQ is released later in qla25xxfreerspque()). If the slot is set to NULL between the two reads, req becomes NULL and is dereferenced.
Read the slot once into req and NULL-check the local before use. mqlock is a mutex and cannot be taken from interrupt context, so the single read plus local check is the appropriate fix for the reported NULL dereference.
Affected Software
Event History
Frequently Asked Questions
What condition is required to trigger the NULL dereference?
A request queue must be torn down such that qla25xx_free_req_que() clears its req_q_map entry while the associated response-queue interrupt is still registered and qla2x00_error_entry() is executing. The race occurs when the map entry becomes NULL between the function's initial NULL check and its second read.
Which systems are exposed?
Systems using the Linux kernel qla2xxx SCSI driver are implicated. Exposure depends on queue teardown occurring concurrently with the response-queue interrupt path.
Is there a safe locking-based workaround if the fix cannot be applied immediately?
The described path cannot take mq_lock because it runs in interrupt context and mq_lock is a mutex. The documented fix is to read the map slot once into a local variable and check that local value before dereferencing it.
How can I determine whether my kernel contains the fix?
Inspect qla2x00_error_entry() in your kernel source or applied patches: it should load ha->req_q_map[que] once into req and perform the NULL check on req before using it. The provided stable references identify commits containing the correction.