platform/mellanox: mlxbf-pmc: Check ACPI_COMPANION() against NULL
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1a218d312e65ec396b2739056a8ea78493015f21 · < d25dd08268aeaceb485189aaa84aa6d68a460291| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
platform/mellanox: mlxbf-pmc: Check ACPI_COMPANION() against NULL
Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence.
mlxbf_pmc_probe() passes the result of ACPI_COMPANION() to acpi_device_hid(), which dereferences it, so force-binding the driver to a device without an ACPI companion leads to a NULL pointer dereference.
Accordingly, add a requisite ACPI_COMPANION() check against NULL to the mlxbf-pmc driver and return -ENODEV when the companion is missing.
From the CVE record · Linux
The Linux kernel's mlxbf-pmc driver can dereference a NULL pointer if it is force-bound to a device without an ACPI companion. This requires the ability to force-bind the driver; the input does not specify the authentication requirements or whether user interaction is needed.
Engineers running Linux kernels with the mlxbf-pmc driver should check their versions; affected versions are not specified.