CVE-2024-35986

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-35986
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-35986.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-35986
Downstream
Related
Published
2024-05-20T10:15:12Z
Modified
2025-08-09T20:01:26Z
Summary
[none]
Details

In the Linux kernel, the following vulnerability has been resolved:

phy: ti: tusb1210: Resolve charger-det crash if charger psy is unregistered

The powersupply frame-work is not really designed for there to be long living in kernel references to powersupply devices.

Specifically unregistering a powersupply while some other code has a reference to it triggers a WARN in powersupply_unregister():

WARN_ON(atomic_dec_return(&psy->use_cnt));

Folllowed by the powersupply still getting removed and the backing data freed anyway, leaving the tusb1210 charger-detect code with a dangling reference, resulting in a crash the next time tusb1210get_online() is called.

Fix this by only holding the reference in tusb1210getonline() freeing it at the end of the function. Note this still leaves a theoretical race window, but it avoids the issue when manually rmmod-ing the charger chip driver during development.

References

Affected packages