CVE-2022-50276 power: supply: fix null pointer dereferencing in power_supply_get_battery_info
A null pointer dereference in the Linux kernel power supply subsystem can cause a denial of service when memory allocation fails.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-50276?
CVE-2022-50276 is a medium-severity vulnerability in Linux kernel, published on 15 Sep 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Weakness: CWE-476
Which versions are affected by CVE-2022-50276?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2022-50276?
Apply the vendor's patch.
Is CVE-2022-50276 being exploited?
There is no known exploitation of CVE-2022-50276 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2022-50276, GHSA-3ggr-5x9x-2989, UBUNTU-CVE-2022-50276.