CVE-2021-47225·Kernel vulnerability
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
- Severity
- medium
- Software
- Kernel
- Fixed in
- 5.12.13
- Published
- 2024-05-21
Affected versions
From: 5.12
Until: 5.12.13
Fixed in: 5.12.13
How to fix this CVE
Update your Linux kernel to version 5.12.13 or later to resolve a deadlock condition in mac80211's AP/VLAN interface handling. This issue occurs when closing AP interfaces while dependent VLAN interfaces remain active, causing the kernel to deadlock due to improper mutex acquisition ordering. Apply the update through your distribution's package manager to restore system stability.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check installed kernel version: uname -r | grep -oP '\d+\.\d+\.\d+'
- Verify if mac80211 wireless driver is in use: lsmod | grep mac80211
- Check for AP_VLAN interfaces on the system: ip link show | grep -i vlan
- Monitor system logs for deadlock warnings: journalctl -u kernel --since '1 hour ago' | grep -i deadlock
- Confirm kernel update applied: uname -r should show version 5.12.13 or later
FAQ
What is CVE-2021-47225?
CVE-2021-47225 is a Linux kernel deadlock vulnerability in the mac80211 wireless driver's AP/VLAN interface management. When an AP interface is closed while dependent VLAN interfaces remain active, the kernel attempts to acquire the wiphy mutex twice, causing a system deadlock.
Is CVE-2021-47225 being actively exploited?
No, this vulnerability is not listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are available. However, it can be trivially triggered locally on affected systems running wireless AP configurations.
What versions of Kernel are affected by CVE-2021-47225?
Linux kernel versions 5.12 through 5.12.12 are affected. The vulnerability was patched in kernel version 5.12.13.
How do I check if my server is vulnerable to CVE-2021-47225?
Run 'uname -r' to check your kernel version. If it shows 5.12.x where x is less than 13, and 'lsmod | grep mac80211' returns output, your system is vulnerable. Additionally, check if AP_VLAN interfaces exist with 'ip link show | grep vlan'.
Does Defensia detect CVE-2021-47225?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2021-47225 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2021-47225. Free for 1 server.
Get started free