Skip to content
Heist/ feed
Back to feed
UnratedFix available

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

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: mmc: moxart: 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 goto error path which will call mmc_free_host().

Products
Kernel
Affected versions
Not specified
Fixed versions
4.14.303, 4.19.270, 4.9.337, 5.10.163, 5.15.86, 5.4.229, 6.0.16, 6.1.2
CVEs
CVE-2022-50268
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 17:36 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 15 Sept 2025, 14:21 UTC

In the Linux kernel, the following vulnerability has been resolved: mmc: moxart: 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 goto error path which will call mmc_free_host().

osv:CVE-2022-50268

Kernel

Fixed versions: 4.9.337, 4.14.303, 4.19.270, 5.4.229, 5.10.163, 5.15.86, 6.0.16, 6.1.2

Complete source record
{
  "id": "23c7c3552158c2397d91f3c8b948ddfb336207a5f9f9edf6e201e0157dfe4a00",
  "url": "https://osv.dev/vulnerability/CVE-2022-50268",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "mmc: moxart: fix return value check of mmc_add_host()",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: mmc: moxart: 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 goto error path which will call mmc_free_host().",
    "evidence": "osv:CVE-2022-50268",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.9.337",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "4.14.303",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "4.19.270",
            "evidence": "/affected/1/ranges"
          },
          {
            "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-50268",
      "aliases": [
        "CVE-2022-50268"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "1b66e94e6b9995323190f31c51d8e1a6f516627e"
                },
                {
                  "fixed": "a4c765f5d8e58138cff69f1510b2e8942ec37022"
                },
                {
                  "fixed": "a94d466f31a5201995d39bc1208e2c09ab04f0bf"
                },
                {
                  "fixed": "c7e9a2059fb943fc3c3fa12261518fd72a0fc136"
                },
                {
                  "fixed": "b174f2b36c638fc7737df6c8aac1889a646be98f"
                },
                {
                  "fixed": "7c3b301ca8b0cab392c71da8fcdfa499074f8e97"
                },
                {
                  "fixed": "f0502fe86a2db2336c9498d2de3e97f22dcf85ae"
                },
                {
                  "fixed": "8f8bb62c7c5c833758ef1563fe738afd579c3efe"
                },
                {
                  "fixed": "40aa73c70e8a5706f9cbe01409a5e51cc0f1750e"
                },
                {
                  "fixed": "0ca18d09c744fb030ae9bc5836c3e357e0237dea"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50268.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.16.0"
                },
                {
                  "fixed": "4.9.337"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.10.0"
                },
                {
                  "fixed": "4.14.303"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.15.0"
                },
                {
                  "fixed": "4.19.270"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.20.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-50268.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:31.057956151Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/0ca18d09c744fb030ae9bc5836c3e357e0237dea",
        "https://git.kernel.org/stable/c/40aa73c70e8a5706f9cbe01409a5e51cc0f1750e",
        "https://git.kernel.org/stable/c/7c3b301ca8b0cab392c71da8fcdfa499074f8e97",
        "https://git.kernel.org/stable/c/8f8bb62c7c5c833758ef1563fe738afd579c3efe",
        "https://git.kernel.org/stable/c/a4c765f5d8e58138cff69f1510b2e8942ec37022",
        "https://git.kernel.org/stable/c/a94d466f31a5201995d39bc1208e2c09ab04f0bf",
        "https://git.kernel.org/stable/c/b174f2b36c638fc7737df6c8aac1889a646be98f",
        "https://git.kernel.org/stable/c/c7e9a2059fb943fc3c3fa12261518fd72a0fc136",
        "https://git.kernel.org/stable/c/f0502fe86a2db2336c9498d2de3e97f22dcf85ae",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50268.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-50268",
        "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-50268.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-50268",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 497898,
  "published_at": "2025-09-15T14:21:04.555+00:00"
}