CVE-2026-97536

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

State
Published
Severity
7.5 High
Published
Sep 25, 2026
Updated
Oct 30, 2026
Reserved
Sep 24, 2026

Read the record on cve.org

Description

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.

Scores

CVSSScoreVectorSource
3.17.5 HighCVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:HLinux

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 68ca949cdb04b4dc71451a999148fbc5f187a220 to before 2089647f81ff5263867ec08589f273899016ad4aAffected
  • 68ca949cdb04b4dc71451a999148fbc5f187a220 to before bf3f802619eb57cb11c706263dca13255db9f3fdAffected
  • 68ca949cdb04b4dc71451a999148fbc5f187a220 to before 942ceba876881a57e5157bb30a8a05f99a77ddd8Affected
  • 68ca949cdb04b4dc71451a999148fbc5f187a220 to before 9bd063c082ef0475dfc28c46f607aa3e90fe13d7Affected
  • 68ca949cdb04b4dc71451a999148fbc5f187a220 to before dd6c14db0dbb7774278e62c8114902f953540932Affected
  • 68ca949cdb04b4dc71451a999148fbc5f187a220 to before 1710a69fd74d0b4bdfcc57c3309b1c4057f70d85Affected
  • 68ca949cdb04b4dc71451a999148fbc5f187a220 to before f1f4d1cb93eeeb250eac9405121933e268eefbd3Affected
  • 68ca949cdb04b4dc71451a999148fbc5f187a220 to before 19788a55cab61d78e33e0914a5a31d27843e8a4aAffected
LinuxLinux
  • 2.6.31Affected
  • before 2.6.31Not affected
  • 5.10.273 through 5.10.*Not affected
  • 5.15.224 through 5.15.*Not affected
  • 6.1.191 through 6.1.*Not affected
  • 6.6.160 through 6.6.*Not affected
  • 6.12.112 through 6.12.*Not affected
  • 6.18.53 through 6.18.*Not affected
  • 7.2.7 through 7.2.*Not affected
  • 7.3 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.