CVE-2021-47225 mac80211: fix deadlock in AP/VLAN handling

Medium 5.5 Published Updated

A deadlock in the Linux kernel mac80211 subsystem can cause a denial of service when closing AP interfaces with active VLANs.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
None listed

What is CVE-2021-47225?

CVE-2021-47225 is a medium-severity vulnerability in Linux kernel, published on 21 May 2024. 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:

mac80211: fix deadlock in AP/VLAN handling

Syzbot reports that when you have AP_VLAN interfaces that are up and close the AP interface they belong to, we get a deadlock. No surprise - since we dev_close() them with the wiphy mutex held, which goes back into the netdev notifier in cfg80211 and tries to acquire the wiphy mutex there.

To fix this, we need to do two things: 1) prevent changing iftype while AP_VLANs are up, we can't easily fix this case since cfg80211 already calls us with the wiphy mutex held, but change_interface() is relatively rare in drivers anyway, so changing iftype isn't used much (and userspace has to fall back to down/change/up anyway) 2) pull the dev_close() loop over VLANs out of the wiphy mutex section in the normal stop case

Weakness: CWE-667

Which versions are affected by CVE-2021-47225?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2021-47225?

No fix has been published for CVE-2021-47225 yet. Limit exposure of the affected software until one is available.

Is CVE-2021-47225 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as GHSA-mpm3-wjp6-8g7x, UBUNTU-CVE-2021-47225.

Is CVE-2021-47225 in your software?

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

Check your SBOMs for free