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
1Patches
6289c964fe1824a6e5d02228029c5b4da41f348dc06333d7560fafcf2fb7ee93d1468f429Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
6- git.kernel.org/stable/c/289c964fe182ce755044a6cd57698072e12ffa6fnvd
- git.kernel.org/stable/c/29c5b4da41f35108136d843c7432885c78cf8272nvd
- git.kernel.org/stable/c/48dc06333d75f41c2ce9ba954bc3231324b45914nvd
- git.kernel.org/stable/c/4a6e5d0222804a3eaf2ea4cf893f412e7cf98cb2nvd
- git.kernel.org/stable/c/60fafcf2fb7ee9a4125dc9a86eeb9d490acf23e2nvd
- git.kernel.org/stable/c/e93d1468f429475a753d6baa79b853b7ee5ef8c0nvd
News mentions
0No linked articles in our index yet.