CVE-2022-50276 (GCVE-0-2022-50276)
Vulnerability from cvelistv5
Published
2025-09-15 14:21
Modified
2025-09-15 14:21
Severity ?
Summary
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.
Impacted products
Vendor Product Version
Linux Linux Version: 3afb50d7125bcdbf71df843134e96ceffc78c8b8
Version: 3afb50d7125bcdbf71df843134e96ceffc78c8b8
Version: 3afb50d7125bcdbf71df843134e96ceffc78c8b8
Version: 3afb50d7125bcdbf71df843134e96ceffc78c8b8
Version: 3afb50d7125bcdbf71df843134e96ceffc78c8b8
Version: 3afb50d7125bcdbf71df843134e96ceffc78c8b8
Create a notification for this product.
   Linux Linux Version: 5.0
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/power/supply/power_supply_core.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "8ea68b4e3fa9392ef9dae303abc8735a033c280f",
              "status": "affected",
              "version": "3afb50d7125bcdbf71df843134e96ceffc78c8b8",
              "versionType": "git"
            },
            {
              "lessThan": "5beadb55f4e36fafe5d6df5dcd5f85d803f3f134",
              "status": "affected",
              "version": "3afb50d7125bcdbf71df843134e96ceffc78c8b8",
              "versionType": "git"
            },
            {
              "lessThan": "d21534ab4fd7883e1c8037a76671d4e8b6ea14cb",
              "status": "affected",
              "version": "3afb50d7125bcdbf71df843134e96ceffc78c8b8",
              "versionType": "git"
            },
            {
              "lessThan": "279af90e65cbdb3e5c4519b0043324d7876bc5ec",
              "status": "affected",
              "version": "3afb50d7125bcdbf71df843134e96ceffc78c8b8",
              "versionType": "git"
            },
            {
              "lessThan": "b8131efb89d9f837c9244f900f0fc2699fd1181d",
              "status": "affected",
              "version": "3afb50d7125bcdbf71df843134e96ceffc78c8b8",
              "versionType": "git"
            },
            {
              "lessThan": "104bb8a663451404a26331263ce5b96c34504049",
              "status": "affected",
              "version": "3afb50d7125bcdbf71df843134e96ceffc78c8b8",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/power/supply/power_supply_core.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.0"
            },
            {
              "lessThan": "5.0",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.229",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.163",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.86",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.0.*",
              "status": "unaffected",
              "version": "6.0.16",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.2",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.229",
                  "versionStartIncluding": "5.0",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.163",
                  "versionStartIncluding": "5.0",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.86",
                  "versionStartIncluding": "5.0",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.16",
                  "versionStartIncluding": "5.0",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.2",
                  "versionStartIncluding": "5.0",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.2",
                  "versionStartIncluding": "5.0",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "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."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-09-15T14:21:13.542Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/8ea68b4e3fa9392ef9dae303abc8735a033c280f"
        },
        {
          "url": "https://git.kernel.org/stable/c/5beadb55f4e36fafe5d6df5dcd5f85d803f3f134"
        },
        {
          "url": "https://git.kernel.org/stable/c/d21534ab4fd7883e1c8037a76671d4e8b6ea14cb"
        },
        {
          "url": "https://git.kernel.org/stable/c/279af90e65cbdb3e5c4519b0043324d7876bc5ec"
        },
        {
          "url": "https://git.kernel.org/stable/c/b8131efb89d9f837c9244f900f0fc2699fd1181d"
        },
        {
          "url": "https://git.kernel.org/stable/c/104bb8a663451404a26331263ce5b96c34504049"
        }
      ],
      "title": "power: supply: fix null pointer dereferencing in power_supply_get_battery_info",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50276",
    "datePublished": "2025-09-15T14:21:13.542Z",
    "dateReserved": "2025-09-15T13:58:00.976Z",
    "dateUpdated": "2025-09-15T14:21:13.542Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-50276\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-09-15T15:15:38.583\",\"lastModified\":\"2025-09-15T15:22:27.090\",\"vulnStatus\":\"Awaiting Analysis\",\"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.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/104bb8a663451404a26331263ce5b96c34504049\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/279af90e65cbdb3e5c4519b0043324d7876bc5ec\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/5beadb55f4e36fafe5d6df5dcd5f85d803f3f134\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/8ea68b4e3fa9392ef9dae303abc8735a033c280f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/b8131efb89d9f837c9244f900f0fc2699fd1181d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/d21534ab4fd7883e1c8037a76671d4e8b6ea14cb\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…