CVE-2025-39952: wifi: wilc1000: avoid buffer overflow in WID string configuration
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
wifi: wilc1000: avoid buffer overflow in WID string configuration
Fix the following copy overflow warning identified by Smatch checker.
drivers/net/wireless/microchip/wilc1000/wlan_cfg.c:184 wilc_wlan_parse_response_frame()
error: '__memcpy()' 'cfg->s[i]->str' copy overflow (512 vs 65537)
This patch introduces size check before accessing the memory buffer. The checks are base on the WID type of received data from the firmware. For WID string configuration, the size limit is determined by individual element size in 'struct wilc_cfg_str_vals' that is maintained in 'len' field of 'struct wilc_cfg_str'.
The Linux kernel CVE team has assigned CVE-2025-39952 to this issue.
Affected and fixed versions
===========================
Fixed in 6.6.108 with commit 6085291a1a5865d4ad70f0e5812d524ebd5d1711 Fixed in 6.12.49 with commit 2203ef417044b10a8563ade6a17c74183745d72e Fixed in 6.16.9 with commit ae50f8562306a7ea1cf3c9722f97ee244f974729 Fixed in 6.17 with commit fe9e4d0c39311d0f97b024147a0d155333f388b5
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-39952
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/microchip/wilc1000/wlan_cfg.c drivers/net/wireless/microchip/wilc1000/wlan_cfg.h
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/6085291a1a5865d4ad70f0e5812d524ebd5d1711 https://git.kernel.org/stable/c/2203ef417044b10a8563ade6a17c74183745d72e https://git.kernel.org/stable/c/ae50f8562306a7ea1cf3c9722f97ee244f974729 https://git.kernel.org/stable/c/fe9e4d0c39311d0f97b024147a0d155333f388b5