CVE-2026-46069: wifi: mwifiex: fix use-after-free in mwifiex_adapter_cleanup()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
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.
The Linux kernel CVE team has assigned CVE-2026-46069 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.0 with commit 4636187da60b6e33526050235c610409d9cc00e8 and fixed in 6.6.140 with commit 11869ce402d95519d49b25a2a97741f68d69d103 Issue introduced in 4.0 with commit 4636187da60b6e33526050235c610409d9cc00e8 and fixed in 6.12.86 with commit 63fe3389b3e092d6c0eeea9fc0318e7918b16618 Issue introduced in 4.0 with commit 4636187da60b6e33526050235c610409d9cc00e8 and fixed in 6.18.27 with commit 4e179a60a60c0a5aea245e8e67768343c0f070b8 Issue introduced in 4.0 with commit 4636187da60b6e33526050235c610409d9cc00e8 and fixed in 7.0.4 with commit 030abbae49cf9fd1fba7aa08e15ec81efbeb78cf Issue introduced in 4.0 with commit 4636187da60b6e33526050235c610409d9cc00e8 and fixed in 7.1-rc1 with commit ae5e95d4157481693be2317e3ffcd84e36010cbb
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-46069
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/net/wireless/marvell/mwifiex/init.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/11869ce402d95519d49b25a2a97741f68d69d103 https://git.kernel.org/stable/c/63fe3389b3e092d6c0eeea9fc0318e7918b16618 https://git.kernel.org/stable/c/4e179a60a60c0a5aea245e8e67768343c0f070b8 https://git.kernel.org/stable/c/030abbae49cf9fd1fba7aa08e15ec81efbeb78cf https://git.kernel.org/stable/c/ae5e95d4157481693be2317e3ffcd84e36010cbb