Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4924F582B86 for ; Fri, 11 Sep 2026 19:51:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789156320; cv=none; b=JHyQ0dh8EDYdM5gEVna/owPLvlFdjmwIIN9OXRVafTw94zoXAo7R6iZI34j1gK5gF1xDY4k4dGbMHChs/UWLqs6BeTrHa/F7Yk23PJyCrdBctLftDTduM60fcRpHfT1DpKVkQPo7ubhGkXgOfwmiUCJ4qOUpmPclWY6nvhN9VPM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789156320; c=relaxed/simple; bh=pGDweDusgJsAjulqvrAvX4AlgMsuQJse/Aoal/toLuA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=VKWudllpZcvFVRoil4HbGkUBk0TupS9HUOkVdwdn3TbxSvX1cfKzHY22AH5szCKM6iPUgk60FmgbGf/nAhcvoZCG/bUgcAR/1+9YKxxjZNjZXicGvKkiEXueANY090q7VPDT2d5Bb8FTg/b7QxdkvcrX0qogkPMjyK09ZIpJ+c0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=IsyO26Yf; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="IsyO26Yf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D27F51F0089D; Fri, 11 Sep 2026 19:51:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789156307; bh=xMioz62kOCVGmDJVG9scE5uWqgtjU+YNpQderaAOAT4=; h=From:To:Cc:Subject:Date:Reply-To; b=IsyO26Yfx2/dOUtY1rz39L4F6icbGRTgIyPxgY1WHFnm4+2mygfRHxrSLvosPS7q4 hB4PL0dv3eeVrx0TJuxP2hQ5DKs6irf60sjEKRbWUoC7/ObsYXFkmt6dDX8IVRbgNl jP1RxIdLwku4A69x/h+k6HQwKOTpBGKxhiaFK1Hw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-89472: power: supply: charger-manager: register regulators before exposing sysfs Date: Fri, 11 Sep 2026 21:42:41 +0200 Message-ID: <2026091103-CVE-2026-89472-31e7@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4261; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=EuFCOM9tUyHLd+RC6NfJOQ9iYkXL/XbV1ZNSn2qnXBs=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlLIv0D2q9WXVJbvkiG268szbbz1pYr/Cmfr3zpT3QQX fXrQIhURywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEykdzfD/AgLxYa7O6UuxWv0 iDL9jZoyP/F9FsP8wExmcx7pTdedwwUScvM4Jf7cO/kHAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In 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. The Linux kernel CVE team has assigned CVE-2026-89472 to this issue. Affected and fixed versions =========================== Issue introduced in 3.7 with commit 3950c7865cd7c963982a2c94457182b96732f4c9 and fixed in 6.12.109 with commit af3ce383ba0d0d48957a22ac7058ff5698775898 Issue introduced in 3.7 with commit 3950c7865cd7c963982a2c94457182b96732f4c9 and fixed in 6.18.50 with commit 86e4fa65368f3bbb506dddba8c9eedc75bd603b2 Issue introduced in 3.7 with commit 3950c7865cd7c963982a2c94457182b96732f4c9 and fixed in 7.2.4 with commit 6d532582ff3c420598f02945b13184c738cc1581 Issue introduced in 3.7 with commit 3950c7865cd7c963982a2c94457182b96732f4c9 and fixed in 7.3-rc1 with commit c57cb36f76eb7ced45f57af1a890d8f3a6d76342 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-89472 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/power/supply/charger-manager.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/af3ce383ba0d0d48957a22ac7058ff5698775898 https://git.kernel.org/stable/c/86e4fa65368f3bbb506dddba8c9eedc75bd603b2 https://git.kernel.org/stable/c/6d532582ff3c420598f02945b13184c738cc1581 https://git.kernel.org/stable/c/c57cb36f76eb7ced45f57af1a890d8f3a6d76342