ACPI: platform: Use acpi_bus_get_primary_device()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ACPI: platform: Use acpi_bus_get_primary_device()
The acpi_get_first_physical_node() usage in acpi_platform_fill_resource() and acpi_create_platform_device() is generally unsafe because in theory the device returned by it may be freed at any time [1].
It is also inefficient because acpi_get_first_physical_node() is called multiple times for the same argument which can be avoided.
Address these issues by using acpi_bus_get_primary_device() instead of acpi_get_first_physical_node() and adjusting the code to call it just once at the beginning of and acpi_create_platform_device() and drop the device reference acquired by it upon the return from that function.
From the CVE record · Linux
The Linux kernel's ACPI platform code uses a device lookup that may return a device freed at any time, creating a potential use-after-free. The input does not specify how an attacker could trigger this condition or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with the affected ACPI platform code should check their kernel version; affected versions are not specified.