Skip to main content
Vulnerability Database/CVE-2026-97531

CVE-2026-97531: Linux Kernel Use-After-Free Vulnerability

CVE-2026-97531 is a use-after-free flaw in the Linux kernel SCSI qla2xxx driver that can cause memory corruption during vport deletion. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-97531 Overview

CVE-2026-97531 is a use-after-free vulnerability in the Linux kernel's qla2xxx SCSI driver for QLogic Fibre Channel host bus adapters. The flaw resides in qla24xx_report_id_acquisition() and is triggered by a race between virtual port (vport) deletion and report ID acquisition. During the window between qla24xx_disable_vp() and qla24xx_deallocate_vp_id(), a dying vport can be re-inserted into the host_map btree. Once scsi_host_put() frees the vha structure, subsequent host_map lookups dereference freed memory. The Linux kernel maintainers have resolved the issue by skipping vports that already have VPORT_DELETE set.

Critical Impact

Successful exploitation leads to kernel-level use-after-free, enabling denial of service or potential privilege escalation on systems using QLogic Fibre Channel adapters.

Affected Products

  • Linux kernel versions containing the qla2xxx SCSI driver prior to the fix commits
  • Systems configured with QLogic Fibre Channel HBAs using virtual ports (NPIV)
  • Stable kernel branches referenced in the upstream fix commits

Discovery Timeline

  • 2026-09-25 - CVE-2026-97531 published to NVD
  • 2026-09-25 - Last updated in NVD database

Technical Details for CVE-2026-97531

Vulnerability Analysis

The qla24xx_report_id_acquisition() format-1 handler iterates the ha->vp_list under vport_slock. It takes a vref_count on the matching vport and calls qla_update_host_map() to register the port ID. This path does not check whether the vport is already undergoing teardown.

When a vport is torn down via qla24xx_vport_delete(), the code sets VPORT_DELETE. The subsequent qla24xx_disable_vp() removes the vport from the host_map btree and zeroes vha->d_id using RESET_AL_PA. The vport is only unlinked from vp_list later in qla24xx_deallocate_vp_id(), which clears vp_map[idx] with RESET_VP_IDX but does not touch host_map.

During that window, report ID acquisition can still locate the vport on vp_list and call qla_update_host_map(). With d_id already zeroed, the code takes the btree_insert32() path and re-inserts the dying vport into host_map. Nothing cleans that entry afterward, so a later lookup dereferences memory freed by scsi_host_put().

Root Cause

The root cause is a race condition and missing teardown guard between the vport deletion sequence and the report ID acquisition path. The deletion sequence spans multiple functions without atomically removing the vport from all data structures. Report ID acquisition lacks a check for VPORT_DELETE, allowing a vport mid-teardown to be re-registered into a structure that will not be cleaned.

Attack Vector

Exploitation requires adjacent network access to the Fibre Channel fabric and the ability to trigger report ID acquisition events while a vport is being deleted. An attacker on the SAN fabric able to influence fabric login state changes could race against administrative vport teardown operations. The attack complexity is high because it depends on precise timing between fabric events and host-side vport lifecycle transitions.

The vulnerability is described in prose only; see the upstream commits referenced below for the authoritative patch diffs: Kernel Git Commit Changes, Kernel Git Commit Fixes, and Kernel Git Commit Update.

Detection Methods for CVE-2026-97531

Indicators of Compromise

  • Kernel oops or panic messages referencing qla2xxx, qla24xx_report_id_acquisition, or btree_lookup32 after vport deletion events
  • KASAN use-after-free reports naming scsi_host or scsi_qla_host_t (vha) allocations
  • Unexpected scsi_host_put() traces coinciding with Fibre Channel fabric RSCN or PLOGI activity

Detection Strategies

  • Enable KASAN on test kernels running the qla2xxx driver and exercise NPIV vport create/delete cycles under fabric load
  • Review dmesg and persistent kernel logs for stack traces that include both vport teardown functions and host_map lookups
  • Correlate SAN switch RSCN events with host-side vport administrative actions to surface race windows

Monitoring Recommendations

  • Forward kernel ring buffer and journald output to a centralized logging pipeline and alert on qla2xxx fault signatures
  • Track NPIV vport lifecycle operations and flag high-frequency create/delete churn on production SAN hosts
  • Monitor host availability metrics for unexplained SCSI subsystem resets or storage path failures

How to Mitigate CVE-2026-97531

Immediate Actions Required

  • Apply the upstream qla2xxx fix that skips vports with VPORT_DELETE set before taking the reference in qla24xx_report_id_acquisition()
  • Update to a stable kernel release that incorporates the commits referenced in the NVD entry
  • Inventory hosts using QLogic Fibre Channel HBAs with NPIV and prioritize patching those systems

Patch Information

The fix mirrors the existing guard in qla2x00_alert_all_vps() by skipping any vport with VPORT_DELETE set before acquiring a reference. This prevents re-insertion of a dying vport into host_map and eliminates the dangling entry that leads to use-after-free. Patched kernel commits are available at Kernel Git Commit Changes, Kernel Git Commit Fixes, and Kernel Git Commit Update.

Workarounds

  • Minimize administrative vport create/delete operations on production SAN hosts until patched kernels are deployed
  • Restrict Fibre Channel fabric access using zoning and LUN masking to limit which initiators can trigger report ID acquisition events
  • Schedule vport maintenance during quiet SAN windows to reduce the probability of racing fabric state changes
bash
# Verify running kernel version and confirm patched build is installed
uname -r

# Check whether the qla2xxx module is loaded and inspect version
modinfo qla2xxx | grep -E '^(version|srcversion|filename)'

# List active Fibre Channel vports to understand NPIV exposure
ls /sys/class/fc_vports/ 2>/dev/null

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.