VYPR
Unrated severityNVD Advisory· Published Dec 9, 2025· Updated Apr 15, 2026

CVE-2022-50653

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

2

Patches

7

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

7

News mentions

0

No linked articles in our index yet.