CVE-2022-50653
Description
In the Linux kernel, the following vulnerability has been resolved:
mmc: atmel-mci: fix return value check of mmc_add_host()
mmc_add_host() may return error, if we ignore its return value, it will lead two issues: 1. The memory that allocated in mmc_alloc_host() is leaked. 2. In the remove() path, mmc_remove_host() will be called to delete device, but it's not added yet, it will lead a kernel crash because of null-ptr-deref in device_del().
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.
A missing return value check of mmc_add_host() in the Atmel MMC driver can lead to memory leak and kernel crash.
Root
Cause
The vulnerability resides in the Atmel MCI driver (drivers/mmc/host/atmel-mci.c). The function mmc_add_host() can return an error, but the driver does not check its return value. This oversight can result in two issues: first, memory allocated by mmc_alloc_host() is leaked if mmc_add_host() fails; second, in the remove path, mmc_remove_host() is called even if the host was never added, leading to a null-pointer dereference in device_del().
Exploitation
An attacker with the ability to trigger a failure condition in mmc_add_host() (e.g., through resource exhaustion or hardware misconfiguration) could cause the driver to proceed with an invalid state. No authentication is required; an unprivileged user may trigger this by manipulating the system to cause the MMC subsystem to probe the device in a low-memory scenario.
Impact
Successful exploitation causes a kernel crash (denial of service) due to a null-pointer dereference. Additionally, memory leaks may degrade system performance over time. The vulnerability is rated medium severity (CVSS 5.5) as it requires local access and results in a temporary denial of service.
Mitigation
The Linux kernel stable branch includes commits that fix the issue by checking the return value of mmc_add_host() and calling mmc_free_host() on failure. The fix was applied in commits such as [1]. Users should update to a kernel version containing this patch.
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
2Patches
71925472dec3199a6cdfa2cf06bb26abb92f200ac0f5f9592cc8bb436f3c885946ceb0fac9e6e8c437266Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
7- git.kernel.org/stable/c/00ac0f5f95920f003cd6ece53cdc759549b69118nvd
- git.kernel.org/stable/c/1925472dec31ec061d57412b3a65a056ea24f340nvd
- git.kernel.org/stable/c/6bb26abb92f25e582a0976091a10b539fe3796dbnvd
- git.kernel.org/stable/c/85946ceb0fac20ab39cdb85333086daf0291a553nvd
- git.kernel.org/stable/c/99a6cdfa2cf05028b52f6d8ee85ccc5f8b71b4a2nvd
- git.kernel.org/stable/c/9e6e8c43726673ca2abcaac87640b9215fd72f4cnvd
- git.kernel.org/stable/c/cc8bb436f3c842a86b9082d97933582120d180e2nvd
News mentions
0No linked articles in our index yet.