In the Linux kernel, the following vulnerability has been resolved:
wifi: iwlwifi: mld: purge async notifications upon nic error
This fixes a kernel panic in reconfig failure:
- we have a BSS connection
- we have a NAN connection
- FW error occurs
- reconfig restores the BSS connection
- however, restoring the NAN connection fails due to a FW error.
- erroneously, ieee80211_handle_reconfig_failure is called and marks all
- mac80211 frees the links of the BSS connection but doesn't tell the
- in ieee80211_stop_device, *ALL* wiphy works are getting flushed
- Therefore, async_handlers_wk is being executed, processing the
- the notification handler dereferences fw_id_to_bss_conf[id], which is
- On the first access to one of the links fields, we panic.
While this can and should be fixed by removing the call to ieee80211_handle_reconfig_failure in (6), it is also not a good idea to carry and maybe handle notifications from a dead FW.
We do purge the notifications when we stop the FW, but in reconfig failure we stop the FW too late, after the notifications are processed. In addition, async_handlers_wk can always be scheduled before the reconfig work.
Purge the notifications immediately when transport notifies about a nic error.