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(&amp;psy-&gt;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.

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:*:*:*:*:*:*