← Back to CVE Explorer

CVE-2022-50276

Full vulnerability record from the local CVENow database.

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.

Severity
MEDIUM
CVSS score
5.5 (v3.1)
Vulnerability status
Analyzed
Source identifier
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Published
2025-09-15 15:15:38.583000
Last modified
2026-11-05 20:17:31.630000
View original CVE JSON
{
  "id": "CVE-2022-50276",
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "published": "2025-09-15T15:15:38.583",
  "lastModified": "2026-11-05T20:17:31.630",
  "vulnStatus": "Analyzed",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "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."
    }
  ],
  "affected": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "affectedData": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "programFiles": [
            "drivers/power/supply/power_supply_core.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "3afb50d7125bcdbf71df843134e96ceffc78c8b8",
              "lessThan": "8ea68b4e3fa9392ef9dae303abc8735a033c280f",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "3afb50d7125bcdbf71df843134e96ceffc78c8b8",
              "lessThan": "5beadb55f4e36fafe5d6df5dcd5f85d803f3f134",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "3afb50d7125bcdbf71df843134e96ceffc78c8b8",
              "lessThan": "d21534ab4fd7883e1c8037a76671d4e8b6ea14cb",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "3afb50d7125bcdbf71df843134e96ceffc78c8b8",
              "lessThan": "279af90e65cbdb3e5c4519b0043324d7876bc5ec",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "3afb50d7125bcdbf71df843134e96ceffc78c8b8",
              "lessThan": "b8131efb89d9f837c9244f900f0fc2699fd1181d",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "3afb50d7125bcdbf71df843134e96ceffc78c8b8",
              "lessThan": "104bb8a663451404a26331263ce5b96c34504049",
              "versionType": "git",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "programFiles": [
            "drivers/power/supply/power_supply_core.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "5.0",
              "status": "affected"
            },
            {
              "version": "0",
              "lessThan": "5.0",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "5.4.229",
              "lessThanOrEqual": "5.4.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "5.10.163",
              "lessThanOrEqual": "5.10.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "5.15.86",
              "lessThanOrEqual": "5.15.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.0.16",
              "lessThanOrEqual": "6.0.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.1.2",
              "lessThanOrEqual": "6.1.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.2",
              "lessThanOrEqual": "*",
              "versionType": "original_commit_for_fix",
              "status": "unaffected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Primary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
          "baseScore": 5.5,
          "baseSeverity": "MEDIUM",
          "attackVector": "LOCAL",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "NONE",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 1.8,
        "impactScore": 3.6
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-11-05T20:08:39.783053Z",
          "id": "CVE-2022-50276",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Primary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-476"
        }
      ]
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "5.0",
              "versionEndExcluding": "5.4.229",
              "matchCriteriaId": "2A559735-D7FB-49EC-A608-46802CA50E6C"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "5.5",
              "versionEndExcluding": "5.10.163",
              "matchCriteriaId": "D05D31FC-BD74-4F9E-B1D8-9CED62BE6F65"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "5.11",
              "versionEndExcluding": "5.15.86",
              "matchCriteriaId": "47237296-55D1-4ED4-8075-D00FC85A61EE"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "5.16",
              "versionEndExcluding": "6.0.16",
              "matchCriteriaId": "C720A569-3D93-4D77-95F6-E2B3A3267D9F"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "6.1",
              "versionEndExcluding": "6.1.2",
              "matchCriteriaId": "77239F4B-6BB2-4B9E-A654-36A52396116C"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://git.kernel.org/stable/c/104bb8a663451404a26331263ce5b96c34504049",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/279af90e65cbdb3e5c4519b0043324d7876bc5ec",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/5beadb55f4e36fafe5d6df5dcd5f85d803f3f134",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/8ea68b4e3fa9392ef9dae303abc8735a033c280f",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/b8131efb89d9f837c9244f900f0fc2699fd1181d",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://git.kernel.org/stable/c/d21534ab4fd7883e1c8037a76671d4e8b6ea14cb",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ]
    }
  ]
}