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.
[
{
"signature_type": "Function",
"digest": {
"function_hash": "216602631623859868254514687864877158373",
"length": 6542.0
},
"target": {
"file": "drivers/power/supply/power_supply_core.c",
"function": "power_supply_get_battery_info"
},
"signature_version": "v1",
"id": "CVE-2022-50276-0669c75f",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@279af90e65cbdb3e5c4519b0043324d7876bc5ec"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "216602631623859868254514687864877158373",
"length": 6542.0
},
"target": {
"file": "drivers/power/supply/power_supply_core.c",
"function": "power_supply_get_battery_info"
},
"signature_version": "v1",
"id": "CVE-2022-50276-17564d26",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b8131efb89d9f837c9244f900f0fc2699fd1181d"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"115917757660345316231528636346820030210",
"294132572032583937754316911590097140746",
"294255672453358593279847793074200802909",
"176997043802454408210500785051489265031"
]
},
"target": {
"file": "drivers/power/supply/power_supply_core.c"
},
"signature_version": "v1",
"id": "CVE-2022-50276-1cd3bd48",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@104bb8a663451404a26331263ce5b96c34504049"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"115917757660345316231528636346820030210",
"294132572032583937754316911590097140746",
"294255672453358593279847793074200802909",
"176997043802454408210500785051489265031"
]
},
"target": {
"file": "drivers/power/supply/power_supply_core.c"
},
"signature_version": "v1",
"id": "CVE-2022-50276-2106f882",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5beadb55f4e36fafe5d6df5dcd5f85d803f3f134"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"115917757660345316231528636346820030210",
"294132572032583937754316911590097140746",
"294255672453358593279847793074200802909",
"176997043802454408210500785051489265031"
]
},
"target": {
"file": "drivers/power/supply/power_supply_core.c"
},
"signature_version": "v1",
"id": "CVE-2022-50276-316c2d7f",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b8131efb89d9f837c9244f900f0fc2699fd1181d"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "216602631623859868254514687864877158373",
"length": 6542.0
},
"target": {
"file": "drivers/power/supply/power_supply_core.c",
"function": "power_supply_get_battery_info"
},
"signature_version": "v1",
"id": "CVE-2022-50276-3794707e",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@104bb8a663451404a26331263ce5b96c34504049"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"115917757660345316231528636346820030210",
"294132572032583937754316911590097140746",
"294255672453358593279847793074200802909",
"176997043802454408210500785051489265031"
]
},
"target": {
"file": "drivers/power/supply/power_supply_core.c"
},
"signature_version": "v1",
"id": "CVE-2022-50276-4704f77d",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@279af90e65cbdb3e5c4519b0043324d7876bc5ec"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "121820765939127541247476758112380869836",
"length": 3210.0
},
"target": {
"file": "drivers/power/supply/power_supply_core.c",
"function": "power_supply_get_battery_info"
},
"signature_version": "v1",
"id": "CVE-2022-50276-6508f3de",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8ea68b4e3fa9392ef9dae303abc8735a033c280f"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"115917757660345316231528636346820030210",
"294132572032583937754316911590097140746",
"294255672453358593279847793074200802909",
"176997043802454408210500785051489265031"
]
},
"target": {
"file": "drivers/power/supply/power_supply_core.c"
},
"signature_version": "v1",
"id": "CVE-2022-50276-7bae4fa5",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d21534ab4fd7883e1c8037a76671d4e8b6ea14cb"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"300477990552468777482669365985924133902",
"89105090002727965588062345941064978275",
"294255672453358593279847793074200802909",
"176997043802454408210500785051489265031"
]
},
"target": {
"file": "drivers/power/supply/power_supply_core.c"
},
"signature_version": "v1",
"id": "CVE-2022-50276-8d4b0480",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8ea68b4e3fa9392ef9dae303abc8735a033c280f"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "304019643987193910279059066953006124645",
"length": 4802.0
},
"target": {
"file": "drivers/power/supply/power_supply_core.c",
"function": "power_supply_get_battery_info"
},
"signature_version": "v1",
"id": "CVE-2022-50276-9049f5b0",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5beadb55f4e36fafe5d6df5dcd5f85d803f3f134"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "161810306433064382182089992309500507",
"length": 5634.0
},
"target": {
"file": "drivers/power/supply/power_supply_core.c",
"function": "power_supply_get_battery_info"
},
"signature_version": "v1",
"id": "CVE-2022-50276-a012728d",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d21534ab4fd7883e1c8037a76671d4e8b6ea14cb"
}
]