Skip to contentSkip to conversation

CVE-2024-46673: scsi: aacraid: Fix double-free on probe failure

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 13, 2024

lore
Share & tools
lore
#0 lore raw

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

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

scsi: aacraid: Fix double-free on probe failure

aac_probe_one() calls hardware-specific init functions through the aac_driver_ident::init pointer, all of which eventually call down to aac_init_adapter().

If aac_init_adapter() fails after allocating memory for aac_dev::queues, it frees the memory but does not clear that member.

After the hardware-specific init function returns an error, aac_probe_one() goes down an error path that frees the memory pointed to by aac_dev::queues, resulting.in a double-free.

The Linux kernel CVE team has assigned CVE-2024-46673 to this issue.

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

	Issue introduced in 2.6.15 with commit 8e0c5ebde82b and fixed in 4.19.321 with commit d237c7d06ffd
	Issue introduced in 2.6.15 with commit 8e0c5ebde82b and fixed in 5.4.283 with commit 564e1986b00c
	Issue introduced in 2.6.15 with commit 8e0c5ebde82b and fixed in 5.10.225 with commit 9e96dea7eff6
	Issue introduced in 2.6.15 with commit 8e0c5ebde82b and fixed in 5.15.166 with commit 85449b28ff6a
	Issue introduced in 2.6.15 with commit 8e0c5ebde82b and fixed in 6.1.108 with commit 60962c3d8e18
	Issue introduced in 2.6.15 with commit 8e0c5ebde82b and fixed in 6.6.49 with commit 8a3995a3ffec
	Issue introduced in 2.6.15 with commit 8e0c5ebde82b and fixed in 6.10.8 with commit 4b540ec7c004
	Issue introduced in 2.6.15 with commit 8e0c5ebde82b and fixed in 6.11-rc6 with commit 919ddf8336f0

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-2024-46673

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/aacraid/comminit.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/d237c7d06ffddcdb5d36948c527dc01284388218
	https://git.kernel.org/stable/c/564e1986b00c5f05d75342f8407f75f0a17b94df
	https://git.kernel.org/stable/c/9e96dea7eff6f2bbcd0b42a098012fc66af9eb69
	https://git.kernel.org/stable/c/85449b28ff6a89c4513115e43ddcad949b5890c9
	https://git.kernel.org/stable/c/60962c3d8e18e5d8dfa16df788974dd7f35bd87a
	https://git.kernel.org/stable/c/8a3995a3ffeca280a961b59f5c99843d81b15929
	https://git.kernel.org/stable/c/4b540ec7c0045c2d01c4e479f34bbc8f147afa4c
	https://git.kernel.org/stable/c/919ddf8336f0b84c0453bac583808c9f165a85c2