CVE-2022-50276Published Sep 15, 2025 · Sep 15Updated Nov 7
power: supply: fix null pointer dereferencing in power_supply_get_battery_info
Linux
Medium5.5Fix available
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3afb50d7125bcdbf71df843134e96ceffc78c8b8 · < 104bb8a663451404a26331263ce5b96c34504049| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
power: supply: fix null pointer dereferencing in power_supply_get_battery_info
when kmalloc() fail to allocate memory in kasprintf(), propname will be NULL, strcmp() called by of_get_property() will cause null pointer dereference.
So return ENOMEM if kasprintf() return NULL pointer.
From the CVE record · Linux
The Linux kernel’s power_supply_get_battery_info function can dereference a null pointer if memory allocation in kasprintf() fails. The input does not establish whether an attacker can trigger this condition, or specify access or user-interaction requirements.
Engineers running the Linux kernel should check their deployments; affected versions were not provided.