CVE-2022-50276

Source
https://cve.org/CVERecord?id=CVE-2022-50276
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50276.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-50276
Downstream
Related
Published
2025-09-15T14:21:13.542Z
Modified
2026-03-20T11:47:21.119463Z
Summary
power: supply: fix null pointer dereferencing in power_supply_get_battery_info
Details

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

power: supply: fix null pointer dereferencing in powersupplygetbatteryinfo

when kmalloc() fail to allocate memory in kasprintf(), propname will be NULL, strcmp() called by ofgetproperty() will cause null pointer dereference.

So return ENOMEM if kasprintf() return NULL pointer.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50276.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
3afb50d7125bcdbf71df843134e96ceffc78c8b8
Fixed
8ea68b4e3fa9392ef9dae303abc8735a033c280f
Fixed
5beadb55f4e36fafe5d6df5dcd5f85d803f3f134
Fixed
d21534ab4fd7883e1c8037a76671d4e8b6ea14cb
Fixed
279af90e65cbdb3e5c4519b0043324d7876bc5ec
Fixed
b8131efb89d9f837c9244f900f0fc2699fd1181d
Fixed
104bb8a663451404a26331263ce5b96c34504049

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50276.json"