HIGH Introduced in 2.6.23
qla2xxx Vport UAF
CVE-2026-89861
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
KernelScan AI6.4MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: scsi: qla2xxx: Hold vport reference in qla24xx_report_id_acquisition() In the format 1 path, the virtual port is located on ha->vp_list while holding vport_slock, but the lock is dropped before vp is used: qla_update_host_map() is called and VP_IDX_ACQUIRED/REGISTER_FC4_NEEDED/ REGISTER_FDMI_NEEDED are set on vp. No reference is taken across that window, so a concurrent qla24xx_deallocate_vp_id() can tear the vport down and free it, leading to a use-after-free. Take a vport reference (vref_count) under vport_slock when the matching vp is found, and drop it after the last use of vp. qla24xx_deallocate_vp_id() waits for vref_count 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->vp_list traversals.
02KernelScan AI Analysis
Risk summary
A use-after-free in the QLogic qla2xxx Fibre Channel driver can be triggered by racing vport deallocation against a hardware-reported vport ID acquisition. An attacker with root access on a system equipped with a QLogic FC HBA can exploit this race to corrupt kernel heap memory, potentially achieving code execution or causing a kernel panic. Systems without QLogic FC hardware or without NPIV virtual port usage are not affected.
Vulnerability analysis
In the qla2xxx Fibre Channel driver, when the hardware reports a virtual port ID acquisition, the driver searches the adapter's virtual port list under a spinlock but drops the lock before using the found vport pointer to update host mappings and set flags. Because no reference count is taken across that unlocked window, a concurrent virtual port deallocation can unlink and free the vport, leaving the dangling pointer to be dereferenced — a use-after-free. The fix takes a reference count on the vport while the lock is still held and releases it only after all uses are complete; the deallocation path already waits for that reference count to reach zero before freeing, so the pointer stays valid throughout. This race is reachable only on systems with a QLogic Fibre Channel HBA running the qla2xxx driver, and the deallocation side requires root privileges to manage NPIV virtual ports through the driver's sysfs interface.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 2.6.23 | 5.10.270 | d09ef32af1e0 |
| 5.15 | 2.6.23 | 5.15.221 | 4b7f0a95bfeb |
| 6.1 | 2.6.23 | 6.1.188 | 267533b28ddf |
| 6.6 | 2.6.23 | 6.6.157 | f8d2eb510c06 |
| 6.12 | 2.6.23 | 6.12.110 | f6b3bcc7cb2f |
| 6.18 | 2.6.23 | 6.18.51 | 47272152a13d |
| 7.2 | 2.6.23 | 7.2.5 | d556f899964d |
| mainline | 2.6.23 | 7.3-rc1 | 793cedee296f |
| cip/6.12 | 2.6.23 | 6.12.111-cip32 | f6b3bcc7cb2f |