Skip to contentSkip to conversation

CVE-2021-47329: scsi: megaraid_sas: Fix resource leak in case of probe failure

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 21, 2024

lore
Share & tools
lore
#0 lore raw

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

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

scsi: megaraid_sas: Fix resource leak in case of probe failure

The driver doesn't clean up all the allocated resources properly when scsi_add_host(), megasas_start_aen() function fails during the PCI device probe.

Clean up all those resources.

The Linux kernel CVE team has assigned CVE-2021-47329 to this issue.

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

	Fixed in 5.4.134 with commit 0c6226601c3e
	Fixed in 5.10.52 with commit 0680db6f4192
	Fixed in 5.12.19 with commit 04b6b9ea8090
	Fixed in 5.13.4 with commit e623f79691c5
	Fixed in 5.14 with commit b5438f48fdd8

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-2021-47329

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/megaraid/megaraid_sas_base.c drivers/scsi/megaraid/megaraid_sas_fusion.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/0c6226601c3e191a44a57d8f9f814b7e5c308959
	https://git.kernel.org/stable/c/0680db6f41920b2c91c7df3cc9cd5968701a6f74
	https://git.kernel.org/stable/c/04b6b9ea80906e3b41ff120b45db31768947cf72
	https://git.kernel.org/stable/c/e623f79691c5104317669ab36ec316a90c05062f
	https://git.kernel.org/stable/c/b5438f48fdd8e1c3f130d32637511efd32038152