NetSight
medium5.5

CVE-2022-50276

In the Linux kernel, the following vulnerability has been resolved: power: supply: fix null pointer dereferencing in power_supply_get_battery_info when kmalloc…

Impact

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

VendorProductAffected versions
LinuxLinux Kernel
from 5.0 before 5.4.229
from 5.5 before 5.10.163
from 5.11 before 5.15.86
from 5.16 before 6.0.16
from 6.1 before 6.1.2

Weakness classification

References