CVE-2026-139697: ACPI: fan: Fix memory leak due to leftover devm_kcalloc() argument
In the Linux kernel, the following vulnerability has been resolved:
ACPI: fan: Fix memory leak due to leftover devmkcalloc() argument
An ACPI device object's dev field in passed as the first argument to devmkcalloc() in acpifangetfps() which is incorrect and leads to a memory leak on driver probe errors and removal because the driver is not bound to that ACPI device.
Address this by replacing that pointer with a pointer to the device the driver is actually bound to.
While at it, drop a redundant error message after a memory allocation failure (that also gets printed relative to the ACPI device).
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In acpi_fan_get_fps(), pass the device the driver is actually bound to (the ACPI device object's dev field) as the first argument to devm_kcalloc().
Event History
Frequently Asked Questions
When can this memory leak occur?
The leak can occur when the ACPI fan driver encounters probe errors or when the driver is removed. It results from associating a devm_kcalloc() allocation with an ACPI device that the driver is not bound to.
Which systems are exposed?
Systems using the Linux kernel ACPI fan driver are relevant. The provided information does not identify affected kernel versions, configurations, or hardware models.
How is the issue fixed?
The fix changes acpi_fan_get_fps() to pass the device to which the driver is actually bound as the devm_kcalloc() device argument, so managed allocations are released correctly on probe failure and driver removal.