CVE-2022-50640 mmc: core: Fix kernel panic when remove non-standard SDIO card

Not scored Published Updated

A use-after-free vulnerability in the Linux kernel MMC core allows local attackers to cause a kernel panic by removing a non-standard SDIO card.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2022-50640?

CVE-2022-50640 is an use after free vulnerability in Linux, published on 9 Dec 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: core: Fix kernel panic when remove non-standard SDIO card

SDIO tuple is only allocated for standard SDIO card, especially it causes memory corruption issues when the non-standard SDIO card has removed, which is because the card device's reference counter does not increase for it at sdio_init_func(), but all SDIO card device reference counter gets decreased at sdio_release_func().

Which versions are affected by CVE-2022-50640?

How do I fix CVE-2022-50640?

Apply the vendor's patch.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2022-50640 being exploited?

There is no known exploitation of CVE-2022-50640 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2022-50640, GHSA-4w99-c287-2jvj, UBUNTU-CVE-2022-50640.

Is CVE-2022-50640 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free