What’s Vulnerable › Vulnerabilities

CVE-2022-50276: power: supply: fix null pointer dereferencing in power_supply_get_battery_info

Description

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.

Affected products

How to fix

Upgrade to a fixed version: Linux kernel 5.10.163, 5.15.86, 5.4.229, 6.0.16. Check the vendor advisory for mitigations.

References

Get alerted when CVE-2022-50276 or the next vulnerability affects your stack