CVE-2026-89861: scsi: qla2xxx: Hold vport reference in qla24xx_report_id_acquisition()
In the Linux kernel, the following vulnerability has been resolved:
scsi: qla2xxx: Hold vport reference in qla24xxreportidacquisition()
In the format 1 path, the virtual port is located on ha->vplist while holding vportslock, but the lock is dropped before vp is used: qlaupdatehostmap() is called and VPIDXACQUIRED/REGISTERFC4NEEDED/ REGISTERFDMINEEDED are set on vp. No reference is taken across that window, so a concurrent qla24xxdeallocatevpid() can tear the vport down and free it, leading to a use-after-free.
Take a vport reference (vrefcount) under vportslock when the matching vp is found, and drop it after the last use of vp. qla24xxdeallocatevpid() waits for vrefcount to reach zero before unlinking and freeing the vport, so the pointer stays valid. This matches the reference idiom already used by the other ha->vplist traversals.
Event History
Frequently Asked Questions
Which deployments are exposed to this race?
The affected path is the format 1 path when it finds a matching virtual port on ha->vp_list. The race requires that virtual port to be deallocated concurrently after the list lock is released and before its later uses complete.
What prevents the use-after-free in the resolved code?
The resolved code increments the virtual port's vref_count while holding vport_slock and releases that reference only after the final use of the virtual port. Deallocation waits for vref_count to reach zero before unlinking and freeing the virtual port.