CVE-2026-23186
JSON

5.5medium

hwmon: (acpi_power_meter) Fix deadlocks related to acpi_power_meter_notify()

Severity
5.5medium CVSS:3.1 by NVD
Exploit likelihood
0.10% (higher than 1% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: hwmon: (acpi_power_meter) Fix deadlocks related to acpi_power_meter_notify() The acpi_power_meter driver's .notify() callback function, acpi_power_meter_notify(), calls hwmon_device_unregister() under a lock that is also acquired by callbacks in sysfs attributes of the device being unregistered which is prone to deadlocks between sysfs access and device removal. Address this by moving the hwmon device removal in acpi_power_meter_notify() outside the lock in question, but notice that doing it alone is not sufficient because two concurrent METER_NOTIFY_CONFIG notifications may be attempting to remove the same device at the same time. To prevent that from happening, add a new lock serializing the execution of the switch () statement in acpi_power_meter_notify(). For simplicity, it is a static mutex which should not be a problem from the performance perspective. The new lock also allows the hwmon_device_register_with_info() in acpi_power_meter_notify() to be called outside the inner lock because it prevents the other notifications handled by that function from manipulating the "resource" object while the hwmon device based on it is being registered. The sending of ACPI netlink messages from acpi_power_meter_notify() is serialized by the new lock too which generally helps to ensure that the order of handling firmware notifications is the same as the order of sending netlink messages related to them. In addition, notice that hwmon_device_register_with_info() may fail in which case resource->hwmon_dev will become an error pointer, so add checks to avoid attempting to unregister the hwmon device pointer to by it in that case to acpi_power_meter_notify() and acpi_power_meter_remove().

Affected

Product or packageVersionsReported by
Linux Linuxfrom 16746ce8adfe04f9ff8df75c1133286ba93c0e17 before 8860ddf0e07be37169d4ef9f2618e39fca934a66, from 16746ce8adfe04f9ff8df75c1133286ba93c0e17 before 615901b57b7ef8eb655f71358f7e956e42bcd16b, 6.15
Not affected: before 6.15, from 6.18.10 up to 6.18.*, from 6.19 up to *
CVE List
linux linux_kernelfrom 6.15 before 6.18.10, 6.19NVD

Classification

CWE-667

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: hwmon: (acpi_power_meter) Fix deadlocks related to acpi_power_meter_notify() The acpi_power_meter driver's .notify() callback function, acpi_power_meter_notify(), calls hwmon_device_unregister() under a lock that is also acquired by callbacks in sysfs attributes of the device being unregistered which is prone to deadlocks between sysfs access and device removal. Address this by moving the hwmon device removal in acpi_power_meter_notify() outside the lock in question, but notice that doing it alone is not sufficient because two concurrent METER_NOTIFY_CONFIG notifications may be attempting to remove the same device at the same time. To prevent that from happening, add a new lock serializing the execution of the switch () statement in acpi_power_meter_notify(). For simplicity, it is a static mutex which should not be a problem from the performance perspective. The new lock also allows the hwmon_device_register_with_info() in acpi_power_meter_notify() to be called outside the inner lock because it prevents the other notifications handled by that function from manipulating the "resource" object while the hwmon device based on it is being registered. The sending of ACPI netlink messages from acpi_power_meter_notify() is serialized by the new lock too which generally helps to ensure that the order of handling firmware notifications is the same as the order of sending netlink messages related to them. In addition, notice that hwmon_device_register_with_info() may fail in which case resource->hwmon_dev will become an error pointer, so add checks to avoid attempting to unregister the hwmon device pointer to by it in that case to acpi_power_meter_notify() and acpi_power_meter_remove().

NVD (es)

En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: hwmon: (acpi_power_meter) Soluciona interbloqueos relacionados con acpi_power_meter_notify() La función de callback .notify() del controlador acpi_power_meter, acpi_power_meter_notify(), llama a hwmon_device_unregister() bajo un bloqueo que también es adquirido por callbacks en atributos sysfs del dispositivo que se está desregistrando, lo cual es propenso a interbloqueos entre el acceso a sysfs y la eliminación del dispositivo. Aborda esto moviendo la eliminación del dispositivo hwmon en acpi_power_meter_notify() fuera del bloqueo en cuestión, pero ten en cuenta que hacerlo solo no es suficiente porque dos notificaciones METER_NOTIFY_CONFIG concurrentes pueden estar intentando eliminar el mismo dispositivo al mismo tiempo. Para evitar que eso suceda, añade un nuevo bloqueo serializando la ejecución de la sentencia switch () en acpi_power_meter_notify(). Para simplificar, es un mutex estático lo cual no debería ser un problema desde la perspectiva del rendimiento. El nuevo bloqueo también permite que hwmon_device_register_with_info() en acpi_power_meter_notify() sea llamado fuera del bloqueo interno porque evita que las otras notificaciones manejadas por esa función manipulen el objeto 'resource' mientras el dispositivo hwmon basado en él está siendo registrado. El envío de mensajes netlink ACPI desde acpi_power_meter_notify() también es serializado por el nuevo bloqueo, lo cual generalmente ayuda a asegurar que el orden de manejo de las notificaciones de firmware es el mismo que el orden de envío de los mensajes netlink relacionados con ellas. Además, ten en cuenta que hwmon_device_register_with_info() puede fallar, en cuyo caso resource->hwmon_dev se convertirá en un puntero de error, así que añade comprobaciones para evitar intentar desregistrar el dispositivo hwmon al que apunta en ese caso a acpi_power_meter_notify() y acpi_power_meter_remove().

References

Sources

SourceRecordLicence
CVE ListCVE-2026-23186 changed 2026-11-05CVE Terms of Use
NVDCVE-2026-23186 changed 2026-11-05Public domain