VYPR
Unrated severityNVD Advisory· Published Dec 30, 2025· Updated Apr 15, 2026

CVE-2022-50858

CVE-2022-50858

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.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

In the Linux kernel's mmc: alcor driver, missing return value check of mmc_add_host() can cause memory leak and kernel crash on removal.

Vulnerability

Overview

In the Linux kernel's mmc: alcor driver, the function mmc_add_host() may return an error, but the driver previously ignored its return value. If mmc_add_host() fails, the memory allocated by mmc_alloc_host() is not freed, leading to a memory leak. Additionally, the driver's remove path attempts to delete a device that was never successfully added, causing a kernel crash [1].

Exploitation

Prerequisites

This vulnerability is triggered during the driver's during driver initialization when mmc when mmc_add_host()` fails. No special privileges are required; the attack surface is local attacker could be triggered by a hardware failure or resource exhaustion that causes the host addition to fail. The attacker would need to be able to influence the system's hardware state or resource availability to cause the failure [1].

Impact

If exploited, the vulnerability results in a memory leak and a kernel crash (NULL pointer dereference) when the driver is removed. This can lead to denial of service (DoS) service (system crash) and potential instability [1].

Mitigation

The fix has been applied in the Linux kernel stable tree. The commit adds a check for the return value of mmc_add_host() and calls mmc_free_host() in the error path to properly clean up resources [1]. Users should update to a kernel version containing this fix.

AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

1

Patches

6

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

6

News mentions

0

No linked articles in our index yet.