CVE-2022-50858

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

State
Published
Severity
Not scored
Published
Dec 30, 2025
Updated
May 11, 2026
Reserved
Dec 30, 2025

Read the record on cve.org

Description

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.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • c5413ad815a675b5c98a002353d8e96b44b164e9 to before 289c964fe182ce755044a6cd57698072e12ffa6fAffected
  • c5413ad815a675b5c98a002353d8e96b44b164e9 to before 4a6e5d0222804a3eaf2ea4cf893f412e7cf98cb2Affected
  • c5413ad815a675b5c98a002353d8e96b44b164e9 to before 29c5b4da41f35108136d843c7432885c78cf8272Affected
  • c5413ad815a675b5c98a002353d8e96b44b164e9 to before 48dc06333d75f41c2ce9ba954bc3231324b45914Affected
  • c5413ad815a675b5c98a002353d8e96b44b164e9 to before 60fafcf2fb7ee9a4125dc9a86eeb9d490acf23e2Affected
  • c5413ad815a675b5c98a002353d8e96b44b164e9 to before e93d1468f429475a753d6baa79b853b7ee5ef8c0Affected
LinuxLinux
  • 5.0Affected
  • before 5.0Not affected
  • 5.4.229 through 5.4.*Not affected
  • 5.10.163 through 5.10.*Not affected
  • 5.15.86 through 5.15.*Not affected
  • 6.0.16 through 6.0.*Not affected
  • 6.1.2 through 6.1.*Not affected
  • 6.2 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.