CVE-2022-50251 mmc: vub300: fix return value check of mmc_add_host()
A missing return value check in the vub300 MMC driver causes memory leaks and kernel crashes, leading to denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-50251?
CVE-2022-50251 is a medium-severity memory corruption vulnerability in Linux kernel, published on 15 Sep 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
mmc: vub300: 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, the timer added before mmc_add_host() needs be del.
And this patch fixes another missing call mmc_free_host() if usb_control_msg() fails.
Weakness: CWE-401
Which versions are affected by CVE-2022-50251?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2022-50251?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2022-50251 being exploited?
There is no known exploitation of CVE-2022-50251 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2022-50251, GHSA-2x5r-jfhx-632p, UBUNTU-CVE-2022-50251.