summaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines
diff options
context:
space:
mode:
authorAjay.Kathat@microchip.com <Ajay.Kathat@microchip.com>2025-08-29 22:58:43 +0000
committerJohannes Berg <johannes.berg@intel.com>2025-09-03 09:39:32 +0200
commitfe9e4d0c39311d0f97b024147a0d155333f388b5 (patch)
tree5d28d469aa1ca86a5131cd3f84faf7321cd06516 /tools/perf/util/scripting-engines
parent62b635dcd69c4fde7ce1de4992d71420a37e51e3 (diff)
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'. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/linux-wireless/aLFbr9Yu9j_TQTey@stanley.mountain Suggested-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Link: https://patch.msgid.link/20250829225829.5423-1-ajay.kathat@microchip.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'tools/perf/util/scripting-engines')
0 files changed, 0 insertions, 0 deletions