CVE-2025-38121: wifi: iwlwifi: mld: avoid panic on init failure
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
wifi: iwlwifi: mld: avoid panic on init failure
In case of an error during init, in_hw_restart will be set, but it will never get cleared.
Instead, we will retry to init again, and then we will act like we are in a restart when we are actually not.
This causes (among others) to a NULL pointer dereference when canceling rx_omi::finished_work, that was not even initialized, because we thought that we are in hw_restart.
Set in_hw_restart to true only if the fw is running, then we know that FW was loaded successfully and we are not going to the retry loop.
The Linux kernel CVE team has assigned CVE-2025-38121 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.14 with commit 7391b2a4f7dbb7be7dd763bc87506c10f570a8d3 and fixed in 6.15.3 with commit a26ec8e16958b6dd37dac9daf5fb6978fe0cb0b8 Issue introduced in 6.14 with commit 7391b2a4f7dbb7be7dd763bc87506c10f570a8d3 and fixed in 6.16-rc1 with commit 960c7e6d388034d219dafffa6da0a5c2ccd5ff30
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-2025-38121
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/intel/iwlwifi/mld/mld.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/a26ec8e16958b6dd37dac9daf5fb6978fe0cb0b8 https://git.kernel.org/stable/c/960c7e6d388034d219dafffa6da0a5c2ccd5ff30