CVE-2022-50670
Description
In the Linux kernel, the following vulnerability has been resolved:
mmc: omap_hsmmc: 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().
Fix this by checking the return value and goto error path wihch will call mmc_free_host().
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
In the Linux kernel's OMAP HSMMC driver, missing return value check of mmc_add_host() can cause memory leak and null-ptr-deref crash on removal.
The omap_hsmmc driver in the Linux kernel fails to check the return value of the mmc_add_host() function. According to the CVE description, if mmc_add_host() fails, the memory allocated by mmc_alloc_host() is never freed, and in the remove path mmc_remove_host() is called on a device that was not added, leading to a null-ptr-deref in device_del().
This issue can be triggered when mmc_add_host() encounters an error, such as during resource allocation failures. An attacker with the ability to induce device errors on a system using the OMAP HSMMC driver could potentially cause a denial of service.
The impact includes a memory leak and a kernel crash upon driver removal, resulting in a denial of service. No privilege escalation or data corruption is described.
The fix was applied in the Linux kernel stable branch in commit fb3d596267a9 [1]. The commit adds a return value check for mmc_add_host() and ensures that on failure, the error path properly calls mmc_free_host(). Users should update their kernel to include 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
3Patches
6f153c9e15f89fb3d596267a962005dfcc396a5f8a45832804e1dc24bcfc8a525cad241c3Vulnerability 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/4e1dc24bcfc8257f24c0663badec7e4f3ae80558nvd
- git.kernel.org/stable/c/62005dfcc396424db3337a1dc3ab49623537f5e5nvd
- git.kernel.org/stable/c/a525cad241c339ca00bf7ebf03c5180f2a9b767cnvd
- git.kernel.org/stable/c/a5f8a4583280a76e50329b910e91ef1dea1e6c79nvd
- git.kernel.org/stable/c/f153c9e15f8961bdf38707853e15b42ea7c691d9nvd
- git.kernel.org/stable/c/fb3d596267a98813a7a8206097d8d46c98505a0dnvd
News mentions
0No linked articles in our index yet.