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

CVE-2022-50618

CVE-2022-50618

Description

In the Linux kernel, the following vulnerability has been resolved:

mmc: meson-gx: 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 which will call mmc_free_host().

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Missing return value check of mmc_add_host() in the meson-gx MMC driver can cause memory leak and potential kernel crash on removal.

Vulnerability

In the Linux kernel's meson-gx MMC driver, the function mmc_add_host() is called without checking its return value. If this function fails, the error is silently ignored, leading to two distinct issues: a memory leak of the host structure allocated by mmc_mmc_alloc_host(), and a null-pointer dereference in the device removal path when mmc_remove_host()` attempts to delete a device that was never added [1].

Exploitation

An attacker would need to trigger a failure in mmc_add_host(), which could occur due to resource exhaustion or hardware misconfiguration. No special privileges are required beyond the ability to cause the MMC subsystem to initialize a host controller. The vulnerability is local and requires physical or physical access or the ability to manipulate the MMC subsystem state.

Impact

If exploited, the memory leak degrades system stability: the memory leak reduces available memory over time, and the null-pointer dereference in device_del() leads to a kernel crash (denial of service). There is no evidence of privilege escalation or data corruption.

Mitigation

The fix was applied in Linux kernel stable commit 42343e3c6195e934b9cb4c08b7ff84a3778d77f9, which adds a proper return value check and jumps to an error path that calls mmc_free_host() to clean up the allocated memory [1]. Users should update to a kernel version containing this commit.

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

1

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.