wifi: mwifiex: fix use-after-free in mwifiex_adapter_cleanup()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 4636187da60b6e33526050235c610409d9cc00e8 · < 4e179a60a60c0a5aea245e8e67768343c0f070b8| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
wifi: mwifiex: fix use-after-free in mwifiex_adapter_cleanup()
The mwifiex_adapter_cleanup() function uses timer_delete() (non-synchronous) for the wakeup_timer before the adapter structure is freed. This is incorrect because timer_delete() does not wait for any running timer callback to complete.
If the wakeup_timer callback (wakeup_timer_fn) is executing when mwifiex_adapter_cleanup() is called, the callback will continue to access adapter fields (adapter->hw_status, adapter->if_ops.card_reset, etc.) which may be freed by mwifiex_free_adapter() called later in the mwifiex_remove_card() path.
Use timer_delete_sync() instead to ensure any running timer callback has completed before returning.
From the CVE record · Linux
The Linux kernel's mwifiex adapter cleanup can free an adapter while its wakeup timer callback is still running. This can cause a use-after-free if the callback accesses the freed adapter; the input does not specify an attack path, authentication requirement, or user interaction.
Engineers running the Linux kernel with the mwifiex Wi-Fi driver should check their kernel versions; affected versions are not specified.