{"id":"CVE-2022-50276","summary":"power: supply: fix null pointer dereferencing in power_supply_get_battery_info","details":"In the Linux kernel, the following vulnerability has been resolved:\n\npower: supply: fix null pointer dereferencing in power_supply_get_battery_info\n\nwhen kmalloc() fail to allocate memory in kasprintf(), propname\nwill be NULL, strcmp() called by of_get_property() will cause\nnull pointer dereference.\n\nSo return ENOMEM if kasprintf() return NULL pointer.","modified":"2026-05-28T03:55:17.152285795Z","published":"2025-09-15T14:21:13.542Z","related":["SUSE-SU-2025:03615-1","SUSE-SU-2025:03628-1","SUSE-SU-2025:3716-1","SUSE-SU-2025:3761-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50276.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/104bb8a663451404a26331263ce5b96c34504049"},{"type":"WEB","url":"https://git.kernel.org/stable/c/279af90e65cbdb3e5c4519b0043324d7876bc5ec"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5beadb55f4e36fafe5d6df5dcd5f85d803f3f134"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8ea68b4e3fa9392ef9dae303abc8735a033c280f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b8131efb89d9f837c9244f900f0fc2699fd1181d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d21534ab4fd7883e1c8037a76671d4e8b6ea14cb"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50276.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50276"},{"type":"PACKAGE","url":"https://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"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.0.0"},{"fixed":"5.4.229"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.5.0"},{"fixed":"5.10.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.86"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.0.16"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.1.0"},{"fixed":"6.1.2"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50276.json"}}],"schema_version":"1.7.5"}