CVE-2023-53166: power: supply: bq25890: Fix external_power_changed race

Published Sep 15, 2025
·
Updated

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

power: supply: bq25890: Fix externalpowerchanged race

bq25890chargerexternalpowerchanged() dereferences bq->charger, which gets sets in bq25890powersupplyinit() like this:

bq->charger = devmpowersupplyregister(bq->dev, &bq->desc, &psycfg);

As soon as devmpowersupplyregister() has called deviceadd() the externalpowerchanged callback can get called. So there is a window where bq25890chargerexternalpowerchanged() may get called while bq->charger has not been set yet leading to a NULL pointer dereference.

This race hits during boot sometimes on a Lenovo Yoga Book 1 yb1-x90f when the chtwcovepwrsrc (extcon) powersupply is done with detecting the connected charger-type which happens to exactly hit the small window:

BUG: kernel NULL pointer dereference, address: 0000000000000018 <snip> RIP: 0010:powersupplyissuppliedby+0xb/0xb0 <snip> Call Trace: <TASK> powersupplygetsupplierproperty+0x19/0x50 classforeachdevice+0xb1/0xe0 powersupplygetpropertyfromsupplier+0x2e/0x50 bq25890chargerexternalpowerchanged+0x38/0x1b0 [bq25890charger] powersupplychangedwork+0x30/0x40 classforeachdevice+0xb1/0xe0 powersupplychangedwork+0x5f/0xe0 <snip>

Fixing this is easy. The externalpowerchanged callback gets passed the powersupply which will eventually get stored in bq->charger, so bq25890chargerexternalpowerchanged() can simply directly use the passed in psy argument which is always valid.

Affected Software

6 affected components
Linux Linux kernel
Linux Linux kernel>=5.18<6.1.31
Linux Linux kernel>=6.2<6.3.5
Linux Linux kernel=6.4-rc1
Linux Linux kernel=6.4-rc2
Linux Linux kernel=6.4-rc3

Event History

Sep 15, 2025
CVE Published
via MITRE·02:03 PM
Data Sourced
via MITRE·02:03 PM
Description
Data Sourced
via NVD·02:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2023-53166?

CVE-2023-53166 is classified with a high severity due to the potential for race condition vulnerabilities in power supply management.

2

How do I fix CVE-2023-53166?

To mitigate CVE-2023-53166, users should update to the latest version of the Linux kernel where the vulnerability has been resolved.

3

What systems are affected by CVE-2023-53166?

CVE-2023-53166 affects the Linux kernel across various distributions that utilize the bq25890 power supply driver.

4

What type of vulnerability is CVE-2023-53166?

CVE-2023-53166 is a race condition vulnerability specifically related to external power state changes in power management.

5

Is there any workaround for CVE-2023-53166?

Currently, the best approach is to apply the kernel update as a workaround for CVE-2023-53166 since no other official workaround has been provided.

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