From mboxrd@z Thu Jan 1 00:00:00 1970 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 6153A3E5596 for ; Wed, 27 May 2026 12:21:39 +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=1779884500; cv=none; b=clMqy3p9gFeMDkjhQkDkhb/WA9VPnu8fC+PS5Jicm3wuHtJO5yxDI2hu7l7sUYZ2TcV6ZfQAMX0ioS+7+D5qgb4JXltNla22OQVYcCmW6FZGPV2gLNtLODEnAYXIOuhcJpwOoDusu2vj8Uxn6003j0tltbMpu3JkyXRe3M0bHVQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779884500; c=relaxed/simple; bh=v5WAh75enks02uQ2k1xQh2CON9qhco8BbfSBLirt5FI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=i4DfCzWDSs8jaNg4hTP3v21OOQ9I3CN5mToyFYvyN92miiKSbjpYi5w/Kce1fptkaNQeMugJ1MsU7YhzYf5yrGfXqiDfuVP9rDNRkI0ngNWUUUcPOSWYnpT5AmqQ+aHSSZK0pa0rkwytc9/s2AQi0/l+fUKa3x/HwF7ypaMcpXQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=CuaimJpY; 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="CuaimJpY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB45E1F000E9; Wed, 27 May 2026 12:21:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779884499; bh=zbQJoSVCcdWiXoPIabR8rHlMAfa31gY6nPb1KFfR0Zc=; h=From:To:Cc:Subject:Date:Reply-To; b=CuaimJpYzagJ2URQjHQzerw8YIguF3i6RTLHRVaC0SxuW9XZs1RkjU+7hii42Lr1y KBulHw7EedcxnYC/4eBrr7V4ZxQuMGiJOHAFLpQcDfQF4TnLNnzTldXjlTiu9SN6zA 3g/PafC+GvJd+CuBhvR0J8QIBjiqgjVnPMVN6BAs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-45879: power: supply: bq25980: Fix use-after-free in power_supply_changed() Date: Wed, 27 May 2026 14:18:41 +0200 Message-ID: <2026052715-CVE-2026-45879-24a2@gregkh> X-Mailer: git-send-email 2.54.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=4296; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=0XLnDeuKLN8HwpK0VL5dvb1zK7pLmtsbOYaKSQdL/nI=; b=owGbwMvMwCRo6H6F97bub03G02pJDFliD9kf+15S+lc7bYO6fuGihXoOevtviinGbDigu1Hgx V+uakeNjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIZCaG+RGrs95MVd68fy1b 729f9x0RzltPGjLMd6oKZ9lpbS7uf1N5w8pT65bOn3ZAHwA= 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: bq25980: Fix use-after-free in power_supply_changed() Using the `devm_` variant for requesting IRQ _before_ the `devm_` variant for allocating/registering the `power_supply` handle, means that the `power_supply` handle will be deallocated/unregistered _before_ the interrupt handler (since `devm_` naturally deallocates in reverse allocation order). This means that during removal, there is a race condition where an interrupt can fire just _after_ the `power_supply` handle has been freed, *but* just _before_ the corresponding unregistration of the IRQ handler has run. This will lead to the IRQ handler calling `power_supply_changed()` with a freed `power_supply` handle. Which usually crashes the system or otherwise silently corrupts the memory... Note that there is a similar situation which can also happen during `probe()`; the possibility of an interrupt firing _before_ registering the `power_supply` handle. This would then lead to the nasty situation of using the `power_supply` handle *uninitialized* in `power_supply_changed()`. Fix this racy use-after-free by making sure the IRQ is requested _after_ the registration of the `power_supply` handle. The Linux kernel CVE team has assigned CVE-2026-45879 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10 with commit 5069185fc18e810715a91d80fcd075e03add600c and fixed in 5.10.252 with commit 86f93dfb23f5bf4f285c4256a7e909d222f7de56 Issue introduced in 5.10 with commit 5069185fc18e810715a91d80fcd075e03add600c and fixed in 5.15.202 with commit 16875e3b7bc9e59bfa0acaf1e43f275a6f42a30f Issue introduced in 5.10 with commit 5069185fc18e810715a91d80fcd075e03add600c and fixed in 6.1.165 with commit 0560a4b09c92e2ecaa883965cf6f9ca51c158ff9 Issue introduced in 5.10 with commit 5069185fc18e810715a91d80fcd075e03add600c and fixed in 6.6.128 with commit 0de95d29d847c6217b7d5845e24a71a4aee7b359 Issue introduced in 5.10 with commit 5069185fc18e810715a91d80fcd075e03add600c and fixed in 6.12.75 with commit 4aeaf03c17260415c2fdd55992f9ad4188d5455a Issue introduced in 5.10 with commit 5069185fc18e810715a91d80fcd075e03add600c and fixed in 6.18.14 with commit 03d1e4ee4e6aa6d2966e883e4ca0e5be73bf1b7c Issue introduced in 5.10 with commit 5069185fc18e810715a91d80fcd075e03add600c and fixed in 6.19.4 with commit abea607ff2f62f4c0a5fb29f7fbdaaab163276a4 Issue introduced in 5.10 with commit 5069185fc18e810715a91d80fcd075e03add600c and fixed in 7.0 with commit 5f0b1cb41906e86b64bf69f5ededb83b0d757c27 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-45879 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/bq25980_charger.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/86f93dfb23f5bf4f285c4256a7e909d222f7de56 https://git.kernel.org/stable/c/16875e3b7bc9e59bfa0acaf1e43f275a6f42a30f https://git.kernel.org/stable/c/0560a4b09c92e2ecaa883965cf6f9ca51c158ff9 https://git.kernel.org/stable/c/0de95d29d847c6217b7d5845e24a71a4aee7b359 https://git.kernel.org/stable/c/4aeaf03c17260415c2fdd55992f9ad4188d5455a https://git.kernel.org/stable/c/03d1e4ee4e6aa6d2966e883e4ca0e5be73bf1b7c https://git.kernel.org/stable/c/abea607ff2f62f4c0a5fb29f7fbdaaab163276a4 https://git.kernel.org/stable/c/5f0b1cb41906e86b64bf69f5ededb83b0d757c27