Skip to main content
← All vulnerabilities
CVE-2026-97536

scsi: qla2xxx: Fix use-after-free of qpair work on queue teardown

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 6.6.160, 6.12.112, 6.18.53, 7.2.7
None on Exploit-DB, Metasploit or GitHub

Summary

In the Linux kernel, the following vulnerability has been resolved: scsi: qla2xxx: Fix use-after-free of qpair work on queue teardown The response queue MSI-X handler qla2xxx_msix_rsp_q() schedules qla_do_work() via queue_work(ha->wq, &qpair->q_work). qla_do_work() dereferences the qpair (vha, rsp) and takes qpair->qp_lock. During teardown, qla2xxx_delete_qpair() deletes the response queue, which calls free_irq() in qla25xx_free_rsp_que(), and then frees the queue and the qpair. free_irq() waits for running hardirq handlers but does not cancel work already placed on ha->wq. A still-pending q_work then runs qla_do_work() against the freed qpair and response queue, causing a use-after-free. This is especially likely during full adapter teardown, where destroy_workqueue(ha->wq) forces pending work to run after the queue pairs have been freed. Flush the work item with cancel_work_sync() in qla25xx_free_rsp_que() after free_irq() has released the interrupt (so no new work can be queued) and before the response queue and qpair memory are freed (so the flushed handler still sees valid memory). Guard on rsp->qpair and ha->wq to match the INIT_WORK() condition and avoid operating on an uninitialized work_struct.

Timeline

  1. CVE published
  2. Record last updated

Affected versions

  • Linux Linux

    From 68ca949cdb04b4dc71451a999148fbc5f187a220 · fixed in 9bd063c082ef0475dfc28c46f607aa3e90fe13d7; From 68ca949cdb04b4dc71451a999148fbc5f187a220 · fixed in dd6c14db0dbb7774278e62c8114902f953540932; From 68ca949cdb04b4dc71451a999148fbc5f187a220 · fixed in 1710a69fd74d0b4bdfcc57c3309b1c4057f70d85; From 68ca949cdb04b4dc71451a999148fbc5f187a220 · fixed in f1f4d1cb93eeeb250eac9405121933e268eefbd3; From 68ca949cdb04b4dc71451a999148fbc5f187a220 · fixed in 19788a55cab61d78e33e0914a5a31d27843e8a4a

  • Linux Linux

    2.6.31

  • KernelLinux

    From 2.6.31 · fixed in 6.6.160; From 6.7.0 · fixed in 6.12.112; From 6.13.0 · fixed in 6.18.53; From 6.19.0 · fixed in 7.2.7

References 5

git.kernel.org