CVE-2022-50769
Description
In the Linux kernel, the following vulnerability has been resolved:
mmc: mxcmmc: 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().
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A missing return value check of mmc_add_host() in the Linux kernel's MXC MMC driver can lead to memory leaks and kernel crashes.
Vulnerability
Description
The MXC MMC driver in the Linux kernel, found in the file mxcmmc.c, contained a missing error check on the call to mmc_add_host(). The function mmc_add_host() may return an error code on failure. Without checking this return value, the driver could continue as if the host was successfully added, even when it was not. This oversight leads to two critical issues: memory allocated via mmc_alloc_host() would be leaked, and subsequent operations in the removal path would try to delete a device that was never added, causing a kernel crash [1][2][3][4].
Exploitation and
Impact
An attacker cannot directly trigger this vulnerability through user interaction; instead, the issue manifests when the kernel attempts to probe the MXC MMC device and the mmc_add_host() call fails (e.g., due to memory pressure or device registration errors). The impact is a denial-of-service (DoS) condition: the memory leak degrades system stability, and the kernel crash on removal halts system operation. The vulnerability is rated with a CVSS v3.1 base score of 4.7 (Medium), reflecting the need for specific hardware conditions or low resources to trigger failure.
Mitigation
The fix, included in Linux kernel stable updates, adds a return value check after mmc_add_host(). If the call fails, the driver now jumps to an error path that properly calls mmc_free_host(), preventing both the memory leak and the crash. Systems running an unpatched kernel are vulnerable; administrators should update to a kernel version containing the commit that addresses this issue [1][2][3][4].
References
The CVE description and multiple stable kernel commit references confirm the nature of the bug and the corrective patch [1][2][3][4].
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
95f35c038c9f41cf0c1e58738b8bdb3fd13d532eb502c972d3904eb97bb782d496050ded8d37474ab9a79d2ead18bc7cccde600af7b41Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
9- git.kernel.org/stable/c/1cf0c1e58738b97e2de207846105b6a5d46622eenvd
- git.kernel.org/stable/c/2d496050ded83b13b16f05e1fc0329b0210d2493nvd
- git.kernel.org/stable/c/32eb502c972dfc34413c9147418b3d94d870c2b8nvd
- git.kernel.org/stable/c/3904eb97bb78fdca3e16d30a38ce5697b9686110nvd
- git.kernel.org/stable/c/5f35c038c9f4d258b3cf77885a2730f1417d63e7nvd
- git.kernel.org/stable/c/b8bdb3fd13d5cd1e86d22fd3f803a742fd88af89nvd
- git.kernel.org/stable/c/cde600af7b413c9fe03e85c58c4279df90e91d13nvd
- git.kernel.org/stable/c/d2ead18bc7cc166220cab5a744a05c5b69431a12nvd
- git.kernel.org/stable/c/d37474ab9a79149075f0823315c6d45dd983a78cnvd
News mentions
0No linked articles in our index yet.