7.1high
hwmon: (pmbus/core) Protect regulator operations with mutex
- Severity
- 7.1high CVSS:3.1 by Linux
- Exploit likelihood
- 0.14% (higher than 2% of CVEs)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: hwmon: (pmbus/core) Protect regulator operations with mutex The regulator operations pmbus_regulator_get_voltage(), pmbus_regulator_set_voltage(), and pmbus_regulator_list_voltage() access PMBus registers and shared data but were not protected by the update_lock mutex. This could lead to race conditions. However, adding mutex protection directly to these functions causes a deadlock because pmbus_regulator_notify() (which calls regulator_notifier_call_chain()) is often called with the mutex already held (e.g., from pmbus_fault_handler()). If a regulator callback then calls one of the now-protected voltage functions, it will attempt to acquire the same mutex. Rework pmbus_regulator_notify() to utilize a worker function to send notifications outside of the mutex protection. Events are stored as atomics in a per-page bitmask and processed by the worker. Initialize the worker and its associated data during regulator registration, and ensure it is cancelled on device removal using devm_add_action_or_reset(). While at it, remove the unnecessary include of linux/of.h.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from ddbb4db4ced1ba784fcd3500179a7291b6c5d7b7 before f0c9ea9c3a208e79c812e10e2bcef87b46564f01, from ddbb4db4ced1ba784fcd3500179a7291b6c5d7b7 before b26849cffaa7c43355b82e9bef3725e786973a1a, from ddbb4db4ced1ba784fcd3500179a7291b6c5d7b7 before acf04e2863132f6d9222f71f3a76fb9782cbe061, from ddbb4db4ced1ba784fcd3500179a7291b6c5d7b7 before 4e9d723d9f198b86f6882a84c501ba1f39e8d055, from ddbb4db4ced1ba784fcd3500179a7291b6c5d7b7 before 2c77ae315f3ce9d2c8e1609be74c9358c1fe4e07, from ddbb4db4ced1ba784fcd3500179a7291b6c5d7b7 before 754bd2b4a084b90b5e7b630e1f423061a9b9b761, 3.19 Not affected: before 3.19, from 6.1.191 up to 6.1.*, from 6.6.143 up to 6.6.*, from 6.12.92 up to 6.12.*, from 6.18.21 up to 6.18.*, from 6.19.11 up to 6.19.* | CVE List |
| linux linux_kernel | from 3.19.1 before 6.18.21, from 6.19 before 6.19.11, 3.19, 7.0 | NVD |
Classification
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: hwmon: (pmbus/core) Protect regulator operations with mutex The regulator operations pmbus_regulator_get_voltage(), pmbus_regulator_set_voltage(), and pmbus_regulator_list_voltage() access PMBus registers and shared data but were not protected by the update_lock mutex. This could lead to race conditions. However, adding mutex protection directly to these functions causes a deadlock because pmbus_regulator_notify() (which calls regulator_notifier_call_chain()) is often called with the mutex already held (e.g., from pmbus_fault_handler()). If a regulator callback then calls one of the now-protected voltage functions, it will attempt to acquire the same mutex. Rework pmbus_regulator_notify() to utilize a worker function to send notifications outside of the mutex protection. Events are stored as atomics in a per-page bitmask and processed by the worker. Initialize the worker and its associated data during regulator registration, and ensure it is cancelled on device removal using devm_add_action_or_reset(). While at it, remove the unnecessary include of linux/of.h.
NVD (es)
En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: hwmon: (pmbus/core) Proteger las operaciones del regulador con un mutex Las operaciones del regulador pmbus_regulator_get_voltage(), pmbus_regulator_set_voltage(), y pmbus_regulator_list_voltage() acceden a los registros PMBus y a datos compartidos, pero no estaban protegidas por el mutex update_lock. Esto podría llevar a condiciones de carrera. Sin embargo, añadir protección de mutex directamente a estas funciones causa un interbloqueo porque pmbus_regulator_notify() (que llama a regulator_notifier_call_chain()) a menudo se llama con el mutex ya retenido (por ejemplo, desde pmbus_fault_handler()). Si una devolución de llamada del regulador llama entonces a una de las funciones de voltaje ahora protegidas, intentará adquirir el mismo mutex. Reestructurar pmbus_regulator_notify() para utilizar una función de trabajador para enviar notificaciones fuera de la protección del mutex. Los eventos se almacenan como atómicos en una máscara de bits por página y son procesados por el trabajador. Inicializar el trabajador y sus datos asociados durante el registro del regulador, y asegurar que se cancele al retirar el dispositivo utilizando devm_add_action_or_reset(). De paso, eliminar la inclusión innecesaria de linux/of.h.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-31486 changed 2026-10-30 | CVE Terms of Use |
| NVD | CVE-2026-31486 changed 2026-11-11 | Public domain |