Skip to content
Heist/ feed
Back to feed
UnratedFix available

mmc: alcor: fix return value check of mmc_add_host()

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: mmc: alcor: fix return value check of mmc_add_host() mmc_add_host() may return error, if we ignore its return value, the memory that allocated in mmc_alloc_host() will be leaked and it will lead a kernel crash because of deleting not added device in the remove path. So fix this by checking the return value and calling mmc_free_host() in the error path.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.163, 5.15.86, 5.4.229, 6.0.16, 6.1.2
CVEs
CVE-2022-50858
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 08:42 UTC · Revision 1

Source evidence

mmc: alcor: fix return value check of mmc_add_host()

core-osv · Original source

Published 30 Dec 2025, 12:15 UTC

In the Linux kernel, the following vulnerability has been resolved: mmc: alcor: fix return value check of mmc_add_host() mmc_add_host() may return error, if we ignore its return value, the memory that allocated in mmc_alloc_host() will be leaked and it will lead a kernel crash because of deleting not added device in the remove path. So fix this by checking the return value and calling mmc_free_host() in the error path.

osv:CVE-2022-50858

Kernel

Fixed versions: 5.4.229, 5.10.163, 5.15.86, 6.0.16, 6.1.2

Complete source record
{
  "id": "97f8e9468a9e2aaea8d92ca3ad550968d0be25ebc925580345c2930004027e63",
  "url": "https://osv.dev/vulnerability/CVE-2022-50858",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "mmc: alcor: fix return value check of mmc_add_host()",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: mmc: alcor: fix return value check of mmc_add_host() mmc_add_host() may return error, if we ignore its return value, the memory that allocated in mmc_alloc_host() will be leaked and it will lead a kernel crash because of deleting not added device in the remove path. So fix this by checking the return value and calling mmc_free_host() in the error path.",
    "evidence": "osv:CVE-2022-50858",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.4.229",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.163",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.86",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.0.16",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.2",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2022-50858",
      "aliases": [
        "CVE-2022-50858"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "c5413ad815a675b5c98a002353d8e96b44b164e9"
                },
                {
                  "fixed": "289c964fe182ce755044a6cd57698072e12ffa6f"
                },
                {
                  "fixed": "4a6e5d0222804a3eaf2ea4cf893f412e7cf98cb2"
                },
                {
                  "fixed": "29c5b4da41f35108136d843c7432885c78cf8272"
                },
                {
                  "fixed": "48dc06333d75f41c2ce9ba954bc3231324b45914"
                },
                {
                  "fixed": "60fafcf2fb7ee9a4125dc9a86eeb9d490acf23e2"
                },
                {
                  "fixed": "e93d1468f429475a753d6baa79b853b7ee5ef8c0"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50858.json"
          }
        },
        {
          "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"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50858.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:27.176858125Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/289c964fe182ce755044a6cd57698072e12ffa6f",
        "https://git.kernel.org/stable/c/29c5b4da41f35108136d843c7432885c78cf8272",
        "https://git.kernel.org/stable/c/48dc06333d75f41c2ce9ba954bc3231324b45914",
        "https://git.kernel.org/stable/c/4a6e5d0222804a3eaf2ea4cf893f412e7cf98cb2",
        "https://git.kernel.org/stable/c/60fafcf2fb7ee9a4125dc9a86eeb9d490acf23e2",
        "https://git.kernel.org/stable/c/e93d1468f429475a753d6baa79b853b7ee5ef8c0",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50858.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-50858",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50858.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-50858",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 493952,
  "published_at": "2025-12-30T12:15:32.534+00:00"
}