In the Linux kernel, the following vulnerability has been resolved:
wifi: cfg80211: clear link ID from bitmap during link delete after clean up
Currently, during link deletion, the link ID is first removed from the validlinks bitmap before performing any clean-up operations. However, some functions require the link ID to remain in the validlinks bitmap. One such example is cfg80211cacevent(). The flow is -
nl80211removelink() cfg80211removelink() ieee80211delintflink() ieee80211vifsetlinks() ieee80211vifupdatelinks() ieee80211linkstop() cfg80211cac_event()
cfg80211cacevent() requires link ID to be present but it is cleared already in cfg80211removelink(). Ultimately, WARN_ON() is hit.
Therefore, clear the link ID from the bitmap only after completing the link clean-up.