Skip to contentSkip to conversation

CVE-2026-97532: scsi: qla2xxx: Null out freed pointers in qla2x00_mem_alloc() error path

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 25

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

scsi: qla2xxx: Null out freed pointers in qla2x00_mem_alloc() error path

When qla2x00_mem_alloc() fails, qla2x00_probe_one() jumps to probe_hw_failed and calls qla2x00_mem_free(). Several error labels in qla2x00_mem_alloc() freed adapter members (elsrej.c, purex_dma_pool, flt, sfp_data, loop_id_map, async_pd, sf_init_cb, ex_init_cb, npiv_info) but left the pointers dangling. qla2x00_mem_free() then freed them a second time. Worse, for the dma_pool members it issued dma_pool_free(ha->s_dma_pool, ...) after s_dma_pool had already been destroyed and set to NULL at fail_s_dma_pool, dereferencing a NULL pool.

Clear each freed pointer (and its DMA handle) in the error labels so the subsequent qla2x00_mem_free() skips them.

The Linux kernel CVE team has assigned CVE-2026-97532 to this issue.

Affected and fixed versions
===========================

	Fixed in 6.18.53 with commit a57570229edb7a0990d5c8067daeb9ac8858a961
	Fixed in 7.2.7 with commit 286d9594a022dd7e0caa3de9daa63b896bc70d43
	Fixed in 7.3-rc1 with commit 6d90f0feb929f6c0f3010f9af4747c7230b75993

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-97532

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/scsi/qla2xxx/qla_os.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/a57570229edb7a0990d5c8067daeb9ac8858a961
	https://git.kernel.org/stable/c/286d9594a022dd7e0caa3de9daa63b896bc70d43
	https://git.kernel.org/stable/c/6d90f0feb929f6c0f3010f9af4747c7230b75993