regulator: core: fix use_count leakage when handling boot-on
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 089b3f61ecfc43ca4ea26d595e1d31ead6de3f7b · < bc6c381df5793ebcf32db88a3e65acf7870379fc| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
regulator: core: fix use_count leakage when handling boot-on
I found a use_count leakage towards supply regulator of rdev with boot-on option.
┌───────────────────┐ ┌───────────────────┐ │ regulator_dev A │ │ regulator_dev B │ │ (boot-on) │ │ (boot-on) │ │ use_count=0 │◀──supply──│ use_count=1 │ │ │ │ │ └───────────────────┘ └───────────────────┘
In case of rdev(A) configured with `regulator-boot-on', the use_count of supplying regulator(B) will increment inside regulator_enable(rdev->supply).
Thus, B will acts like always-on, and further balanced regulator_enable/disable cannot actually disable it anymore.
However, B was also configured with `regulator-boot-on', we wish it could be disabled afterwards.
From the CVE record · Linux
The Linux kernel regulator core can leak a supply regulator's use count when a regulator configured with `regulator-boot-on` is supplied by another boot-on regulator. This can prevent the supply regulator from being disabled after balanced enable and disable calls. The input does not describe an attacker path, authentication requirement, or user interaction.
Engineers running Linux kernels with regulators configured this way should check their systems; affected versions are not specified.