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 7F6D53F8EA6 for ; Wed, 27 May 2026 12:24:42 +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=1779884684; cv=none; b=jZgPLgBOLbBpanWiBZFXGA/zpxGkmGCTz5L42Fgm+hX3N0gXm7YF7gNM4enbq0vXOfkHr5OJ63c2uZHZDH1j52H2ZCeokhXe2glAVMWGIvqZ+5DVr2y54RJaG0/Wc2xjIHaG90swdurr6LX3Ry/wudpWBVyM1MxEgpuVRhXf8tU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779884684; c=relaxed/simple; bh=/JHJ7g/rJgx4roTOMlnew22XbaYzMipzZtoe8+RnnVo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=NmZiLsc6E8njFBiY9QJyLX0u0jsFjLQcjlbGfoCMbU1yT7m3usOI/WF1ZFcjABb1ij96u6dF6beHnQzxC6yIN8YW6f9DHoNdZWVl+eh9MZOBOO2KApqWBxnRUg/UqmOeCiCvb8i5zKCf9wnWO13P3AeV2Ucmx4ednslL8g3mSRw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Nlu3ygms; 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="Nlu3ygms" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACD751F000E9; Wed, 27 May 2026 12:24:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779884682; bh=gFavkDeDQ1otk9nSiucjxVwgctzcHi62ttLLQ7qYzYk=; h=From:To:Cc:Subject:Date:Reply-To; b=Nlu3ygmsDAk36wk38I5FEXlnnp7UYGDxEFuoMnHaPAixRj4H+NlYSwPzLHkwUdBVU j5ftG6vqHO+uP9Ub0TC/xCUgpQYjlEqNxrJmktddhLY9RlHdTNKgwoFPfTjOy95tG8 p15WsMOBeYJBIE0b4Y1fIUoDwHcOtRCCD3KQ12gg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-45938: power: supply: pm8916_lbc: Fix use-after-free in power_supply_changed() Date: Wed, 27 May 2026 14:19:40 +0200 Message-ID: <2026052728-CVE-2026-45938-0bb2@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=3372; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=0N3D59Ev35izybwTSQZRVpJNdqehi562bh3O9LvVBKg=; b=owGbwMvMwCRo6H6F97bub03G02pJDFliD0V2tQnLu/UJ2noWKx28e+NKMXdE6h+RR7/ePH/F+ en31oLOjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhIiCvD/NzeT2dnvP9qffyw 8b0j9lazmGpL9zIsuNh2b0acoqpOn0iPgabWS6kk4QUfAA== 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: pm8916_lbc: 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-45938 to this issue. Affected and fixed versions =========================== Issue introduced in 6.7 with commit f8d7a3d21160a0cab4d15b81231f2a76b0fcee13 and fixed in 6.12.75 with commit dbe579e620ef0f53db490ec79a8566e4ea8918ac Issue introduced in 6.7 with commit f8d7a3d21160a0cab4d15b81231f2a76b0fcee13 and fixed in 6.18.14 with commit 08e674e9862a2db46fb234eb7c5442455ece0131 Issue introduced in 6.7 with commit f8d7a3d21160a0cab4d15b81231f2a76b0fcee13 and fixed in 6.19.4 with commit d7d31fc99d248d5f47588f50dce5c7599c991c6a Issue introduced in 6.7 with commit f8d7a3d21160a0cab4d15b81231f2a76b0fcee13 and fixed in 7.0 with commit b7508129978ae1e2ed9b0410396abc05def9c4eb 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-45938 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/pm8916_lbc.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/dbe579e620ef0f53db490ec79a8566e4ea8918ac https://git.kernel.org/stable/c/08e674e9862a2db46fb234eb7c5442455ece0131 https://git.kernel.org/stable/c/d7d31fc99d248d5f47588f50dce5c7599c991c6a https://git.kernel.org/stable/c/b7508129978ae1e2ed9b0410396abc05def9c4eb