CVE-2022-50886
Description
In the Linux kernel, the following vulnerability has been resolved:
mmc: toshsd: 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(), besides, free_irq() also needs be called.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Missing error check for mmc_add_host() in the Toshiba SD MMC driver could cause memory leak and kernel crash.
Vulnerability
The toschsd driver in the Linux kernel for Toshiba SD/MMC host controllers fails to check the return value of mmc_add_host(). If this function fails, the allocated memory from mmc_alloc_host() is not freed, leading to a memory leak. Moreover, on driver removal, the system attempts to delete a host device that was never successfully added, which can trigger a kernel crash [1][2].
Exploitation
An attacker would need to trigger a failure in mmc_add_host(), which could occur due to resource exhaustion or other transient errors during device initialization. No authentication is required, as the flaw is in the kernel's core device handling path. The attack surface is local, requiring the ability to cause the driver to bind to a Toshiba SD host controller and force the allocation to fail [3].
Impact
A successful exploit could result in a denial of service via kernel crash (NULL pointer dereference when removing a non-added device) or memory leak, potentially degrading system stability over time. No privilege escalation is described [4].
Mitigation
The fix has been applied in the Linux kernel stable branches. Patches are available in commits aabbedcb6c9a (version 1), bfd77b194c94, 34ae492f8d17, and 4f6cb1c685f9. System administrators should update to the latest kernel version containing these fixes [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
934ae492f8d173329e7b7132c4f6cb1c685f93dbb69a0242caabbedcb6c9a6444079767b6647e370dd0efbfd77b194c94f670744a316eVulnerability 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/3329e7b7132ca727263fb0ee214cf52cc6dcaaadnvd
- git.kernel.org/stable/c/34ae492f8d172f0bd193c24cad588b35419ea47anvd
- git.kernel.org/stable/c/3dbb69a0242c31ea4c9eee22b1c41b515fe509a0nvd
- git.kernel.org/stable/c/4f6cb1c685f9e20a4a9fa565e442f5af4dad70ffnvd
- git.kernel.org/stable/c/6444079767b68b1fbed0e7668081146e80dcb719nvd
- git.kernel.org/stable/c/647e370dd0ef7e212d8d014bda748e461eab2e8cnvd
- git.kernel.org/stable/c/aabbedcb6c9a72d12d35dc672e83f0c8064d8a61nvd
- git.kernel.org/stable/c/bfd77b194c94aefbde4efc30ddf8607dd9244672nvd
- git.kernel.org/stable/c/f670744a316ea983113a65313dcd387b5a992444nvd
News mentions
0No linked articles in our index yet.