pmdomain: core: Fix detach procedure for virtual devices in genpd
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3c095f32a92be4d07f3172a777dab1aacdb6a728 · < 51a7dd9cbae9210335ce398642ecaaa52c939eb5| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
pmdomain: core: Fix detach procedure for virtual devices in genpd
If a device is attached to a PM domain through genpd_dev_pm_attach_by_id(), genpd calls pm_runtime_enable() for the corresponding virtual device that it registers. While this avoids boilerplate code in drivers, there is no corresponding call to pm_runtime_disable() in genpd_dev_pm_detach().
This means these virtual devices are typically detached from its genpd, while runtime PM remains enabled for them, which is not how things are designed to work. In worst cases it may lead to critical errors, like a NULL pointer dereference bug in genpd_runtime_suspend(), which was recently reported. For another case, we may end up keeping an unnecessary vote for a performance state for the device.
To fix these problems, let's add this missing call to pm_runtime_disable() in genpd_dev_pm_detach().
From the CVE record · Linux
The Linux kernel's genpd detach procedure can leave runtime power management enabled for a virtual device. This may cause a NULL pointer dereference during runtime suspend or retain an unnecessary performance-state vote. The input does not specify an attacker path, authentication requirements, or user interaction.
Engineers running Linux kernels that use genpd virtual devices should check their kernels; affected versions are not specified.