CVE-2026-45902: power: supply: bq256xx: Fix use-after-free in power_supply_changed()

Published May 27, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

power: supply: bq256xx: Fix use-after-free in powersupplychanged()

Using the devm variant for requesting IRQ before the devm variant for allocating/registering the powersupply handle, means that the powersupply 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 powersupply handle has been freed, but just before the corresponding unregistration of the IRQ handler has run.

This will lead to the IRQ handler calling powersupplychanged() with a freed powersupply 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 powersupply handle. This would then lead to the nasty situation of using the powersupply handle uninitialized in powersupplychanged().

Fix this racy use-after-free by making sure the IRQ is requested after the registration of the powersupply handle.

Affected Software

7 affected components
Linux Linux kernel (bq256xx power_supply driver)
Linux Linux kernel>=5.12<5.15.202
Linux Linux kernel>=5.16<6.1.165
Linux Linux kernel>=6.2<6.6.128
Linux Linux kernel>=6.7<6.12.75
Linux Linux kernel>=6.13<6.18.14
Linux Linux kernel>=6.19<6.19.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    In probe(), ensure the IRQ is requested after the power_supply handle is allocated/registered (i.e., perform the devm_ allocation/registration of the power_supply handle before using the devm_ variant to request the IRQ) so that deallocation/unregistration order prevents the IRQ handler from running with a freed power_supply handle.

    power: supply: bq256xx IRQ request order / power_supply registration order = Register the power_supply handle before requesting the IRQ; use the devm_ variant for allocating/registering the power_supply handle before the devm_ variant for requesting the IRQ

Event History

May 27, 2026
CVE Published
via MITRE·12:17 PM
Data Sourced
via MITRE·12:17 PM
Description
Data Sourced
via NVD·02:17 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which systems are exposed to this issue?

Systems using the Linux kernel bq256xx power_supply driver are affected. The vulnerable paths involve driver probe and device removal while its interrupt handler can run.

2

What conditions are required to trigger the vulnerability?

An interrupt must fire during a narrow race window: either before the power_supply handle is registered during probe, or after it has been freed during device removal but before the IRQ handler is unregistered. Exploitation requires local access with low privileges according to the CVSS vector.

3

What is the likely impact if the race occurs?

The IRQ handler can call power_supply_changed() with an uninitialized or freed power_supply handle. This can crash the system or silently corrupt memory, with high confidentiality, integrity, and availability impact in the supplied CVSS assessment.

4

How is the issue addressed?

The fix requests the IRQ only after allocating and registering the power_supply handle, preventing interrupts from using an uninitialized handle during probe and ensuring IRQ teardown occurs before the handle is released during removal.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203