Bug 1224828 (CVE-2021-47225) - VUL-0: CVE-2021-47225: kernel: mac80211: fix deadlock in AP/VLAN handling
Summary: VUL-0: CVE-2021-47225: kernel: mac80211: fix deadlock in AP/VLAN handling
Status: RESOLVED FIXED
Alias: CVE-2021-47225
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Minor
Target Milestone: ---
Assignee: Security Team bot
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/406844/
Whiteboard: CVSSv3.1:SUSE:CVE-2021-47225:3.3:(AV:...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-22 07:17 UTC by SMASH SMASH
Modified: 2024-07-03 13:33 UTC (History)
3 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SMASH SMASH 2024-05-22 07:17:03 UTC
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

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-47225
https://git.kernel.org/pub/scm/linux/security/vulns.git/plain/cve/published/2021/CVE-2021-47225.mbox
https://git.kernel.org/stable/c/8043903fcb72f545c52e3ec74d6fd82ef79ce7c5
https://git.kernel.org/stable/c/d5befb224edbe53056c2c18999d630dafb4a08b9
https://www.cve.org/CVERecord?id=CVE-2021-47225
Comment 2 Andrea Mattiazzo 2024-07-03 13:33:20 UTC
All done, closing.