GHSA-cmqg-p6gh-rwg2HighCVSS 7.4
In the Linux kernel, the following vulnerability has been resolved: wifi: iwlwifi: mld: purge...
🔗 CVE IDs covered (1)
📋 Description
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 interfaces as not-in-driver (will be fixed in a different patch).
- mac80211 frees the links of the BSS connection but doesn't tell the driver about that, as it thinks that this vif is not in the driver.
- in ieee80211_stop_device, ALL wiphy works are getting flushed (erroneously?)
- Therefore, async_handlers_wk is being executed, processing the statistics notification that was received after we restored the BSS connection.
- the notification handler dereferences fw_id_to_bss_conf[id], which is now a dangling pointer, as mac80211 already freed this link in (7).
- 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.