{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2026-89472",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2026-89472"
  ],
  "published": "2026-09-11T19:47:07Z",
  "summary": "power: supply: charger-manager: register regulators before exposing sysfs",
  "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's 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.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": null,
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-89472"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/af3ce383ba0d0d48957a22ac7058ff5698775898"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/86e4fa65368f3bbb506dddba8c9eedc75bd603b2"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/6d532582ff3c420598f02945b13184c738cc1581"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/c57cb36f76eb7ced45f57af1a890d8f3a6d76342"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-09-13T06:49:25Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The UAF is reached via local sysfs under /sys/class/power_supply/*/charger.N/{state,externally_control} and via charger_manager_remove()/probe unwind on the charger-manager platform device; this power-supply driver has no network, Bluetooth, or remote packet path into try_charger_enable() or the sysfs handlers.\nAC:L - An attacker can hammer the live sysfs attributes while teardown or probe unwind runs, controlling the sysfs side of the race; charger_manager_remove() also deterministically calls try_charger_enable() on already-freed regulator consumers when charging is enabled, with no attacker-uncontrollable memory layout required.\nPR:L - charger.N/state is mode 0444 and charger_state_show() calls regulator_is_enabled() on the consumer, so an unprivileged local user (including apps on charger-manager phones/embedded devices) can hit the UAF during the teardown or probe window; per driver-removal UAF precedent this is PR:L even though sysfs unbind itself is privileged.\nUI:N - The attacker performs their own sysfs reads or writes against the charger-manager power_supply attributes and can race driver unbind or probe; no separate victim action such as mounting a filesystem or confirming a prompt is required.\nS:U - The dangling struct regulator is kernel heap used by the same host kernel; this is a standard in-kernel use-after-free/privilege-escalation within one security authority, not a VM escape, IOMMU bypass, or sandbox breakout.\nC:H - regulator_put() kfree()s the struct regulator while charger_state_show() and try_charger_enable() still dereference the consumer; this heap UAF lets a reused object be read through regulator_is_enabled() and related helpers, enabling arbitrary kernel information disclosure.\nI:H - The same dangling consumer is passed to regulator_enable(), regulator_disable(), and regulator_force_disable() from try_charger_enable() and charger_externally_control_store(), so a sprayed heap object can turn the UAF into arbitrary writes and control-flow hijack.\nA:H - Use of the freed or still-NULL regulator consumer oopses or panics the kernel in regulator_is_enabled()/enable()/disable(), and the UAF crashes even when it is not fully converted into a read/write primitive."
    }
  }
}
