GHSA-24QW-5J5F-29WM
Vulnerability from github – Published: 2026-09-11 21:31 – Updated: 2026-09-13 09:32In the Linux kernel, the following vulnerability has been resolved:
power: supply: charger-manager: register regulators before exposing sysfs
charger_manager_remove() and the err_reg_extcon probe error path free each charger regulator with regulator_put() before tearing down the power_supply sysfs entries (power_supply_unregister()). charger_manager_remove() also calls try_charger_enable(cm, false) after the regulator_put() loop. A concurrent write to a charger's externally_control sysfs attribute that lands between regulator_put() and power_supply_unregister() can run charger_externally_control_store() and call try_charger_enable(), which, when charging is enabled, dereferences the already-freed consumer handle. When charging is enabled, try_charger_enable(cm, false) in .remove() also dereferences the freed handles directly. Both leave use-after-free windows. Symmetrically, probe registers the sysfs entries (power_supply_register) before acquiring the regulators (regulator_get, inside charger_manager_register_extcon), so userspace can reach externally_control before the regulators are available.
Split charger_manager_register_extcon() on the sync/async boundary: charger_manager_get_regulators() (regulator_get only, no async producer) now runs before power_supply_register() so sysfs is not live before regulators are available, and charger_manager_register_extcon() keeps only the extcon notifier/work setup, still after power_supply_register() so a power_supply_register() failure cannot reach extcon setup. This keeps the sysfs setup/teardown ordering symmetric without introducing an asynchronous producer on the earlier probe-error path.
Move power_supply_unregister() and try_charger_enable(cm, false) ahead of the regulator_put() loop on both teardown paths, and adjust err_reg_extcon (power_supply_unregister() then fall through err_regulator for regulator_put(); get_regulators self-rolls back on its own failure).
This does not address the separate extcon-notifier-driven deref of the same handles, which needs its own synchronization design.
Found by an in-house static analysis tool.
{
"affected": [],
"aliases": [
"CVE-2026-89472"
],
"database_specific": {
"cwe_ids": [],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-09-11T20:19:28Z",
"severity": "HIGH"
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\npower: supply: charger-manager: register regulators before exposing sysfs\n\ncharger_manager_remove() and the err_reg_extcon probe error path free each\ncharger regulator with regulator_put() before tearing down the power_supply\nsysfs entries (power_supply_unregister()). charger_manager_remove() also\ncalls try_charger_enable(cm, false) after the regulator_put() loop. A\nconcurrent write to a charger\u0027s externally_control sysfs attribute that\nlands between regulator_put() and power_supply_unregister() can run\ncharger_externally_control_store() and call try_charger_enable(), which,\nwhen charging is enabled, dereferences the already-freed consumer handle.\nWhen charging is enabled, try_charger_enable(cm, false) in .remove() also\ndereferences the freed handles directly. Both leave use-after-free windows.\nSymmetrically, probe registers the sysfs entries (power_supply_register)\nbefore acquiring the regulators (regulator_get, inside\ncharger_manager_register_extcon), so userspace can reach externally_control\nbefore the regulators are available.\n\nSplit charger_manager_register_extcon() on the sync/async boundary:\ncharger_manager_get_regulators() (regulator_get only, no async producer)\nnow runs before power_supply_register() so sysfs is not live before\nregulators are available, and charger_manager_register_extcon() keeps only\nthe extcon notifier/work setup, still after power_supply_register() so a\npower_supply_register() failure cannot reach extcon setup. This keeps the\nsysfs setup/teardown ordering symmetric without introducing an asynchronous\nproducer on the earlier probe-error path.\n\nMove power_supply_unregister() and try_charger_enable(cm, false) ahead of\nthe regulator_put() loop on both teardown paths, and adjust err_reg_extcon\n(power_supply_unregister() then fall through err_regulator for\nregulator_put(); get_regulators self-rolls back on its own failure).\n\nThis does not address the separate extcon-notifier-driven deref of the same\nhandles, which needs its own synchronization design.\n\nFound by an in-house static analysis tool.",
"id": "GHSA-24qw-5j5f-29wm",
"modified": "2026-09-13T09:32:12Z",
"published": "2026-09-11T21:31:27Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-89472"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/6d532582ff3c420598f02945b13184c738cc1581"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/86e4fa65368f3bbb506dddba8c9eedc75bd603b2"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/af3ce383ba0d0d48957a22ac7058ff5698775898"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/c57cb36f76eb7ced45f57af1a890d8f3a6d76342"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.