Skip to contentSkip to conversation

CVE-2021-47289: ACPI: fix NULL pointer dereference

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:

ACPI: fix NULL pointer dereference

Commit 71f642833284 ("ACPI: utils: Fix reference counting in for_each_acpi_dev_match()") started doing "acpi_dev_put()" on a pointer that was possibly NULL. That fails miserably, because that helper inline function is not set up to handle that case.

Just make acpi_dev_put() silently accept a NULL pointer, rather than calling down to put_device() with an invalid offset off that NULL pointer.

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

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

	Fixed in 5.4.139 with commit 38f54217b423
	Fixed in 5.10.57 with commit cae3fa3d8165
	Fixed in 5.13.6 with commit ccf23a088807
	Fixed in 5.14 with commit fc68f42aa737

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-47289

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:
include/acpi/acpi_bus.h

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/38f54217b423c0101d03a00feec6fb8ec608b12e
	https://git.kernel.org/stable/c/cae3fa3d8165761f3000f523b11cfa1cd35206bc
	https://git.kernel.org/stable/c/ccf23a0888077a25a0793a746c3941db2a7562e4
	https://git.kernel.org/stable/c/fc68f42aa737dc15e7665a4101d4168aadb8e4c4