CVE-2024-35986
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
20/05/2024
Last modified:
04/04/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
phy: ti: tusb1210: Resolve charger-det crash if charger psy is unregistered<br />
<br />
The power_supply frame-work is not really designed for there to be<br />
long living in kernel references to power_supply devices.<br />
<br />
Specifically unregistering a power_supply while some other code has<br />
a reference to it triggers a WARN in power_supply_unregister():<br />
<br />
WARN_ON(atomic_dec_return(&psy->use_cnt));<br />
<br />
Folllowed by the power_supply still getting removed and the<br />
backing data freed anyway, leaving the tusb1210 charger-detect code<br />
with a dangling reference, resulting in a crash the next time<br />
tusb1210_get_online() is called.<br />
<br />
Fix this by only holding the reference in tusb1210_get_online()<br />
freeing it at the end of the function. Note this still leaves<br />
a theoretical race window, but it avoids the issue when manually<br />
rmmod-ing the charger chip driver during development.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
CPE | From | Up to |
---|---|---|
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.18 (including) | 6.1.90 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.30 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.8.9 (excluding) |
cpe:2.3:o:linux:linux_kernel:6.9:rc1:*:*:*:*:*:* | ||
cpe:2.3:o:linux:linux_kernel:6.9:rc2:*:*:*:*:*:* | ||
cpe:2.3:o:linux:linux_kernel:6.9:rc3:*:*:*:*:*:* | ||
cpe:2.3:o:linux:linux_kernel:6.9:rc4:*:*:*:*:*:* | ||
cpe:2.3:o:linux:linux_kernel:6.9:rc5:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/25b3498485ac281e5851700e33b97f12c9533fd8
- https://git.kernel.org/stable/c/73224a5d2180066c7fe05b4656647601ba08d588
- https://git.kernel.org/stable/c/9827caa5105fb16d1fae2e75c8d0e4662014b3ca
- https://git.kernel.org/stable/c/bf6e4ee5c43690e4c5a8a057bbcd4ff986bed052
- https://git.kernel.org/stable/c/25b3498485ac281e5851700e33b97f12c9533fd8
- https://git.kernel.org/stable/c/73224a5d2180066c7fe05b4656647601ba08d588
- https://git.kernel.org/stable/c/9827caa5105fb16d1fae2e75c8d0e4662014b3ca
- https://git.kernel.org/stable/c/bf6e4ee5c43690e4c5a8a057bbcd4ff986bed052