CVE-2024-56539

wifi: mwifiex: Fix memcpy() field-spanning write warning in mwifiex_config_scan()

MEDIUM
5.5
CVSS Score
Published: December 27, 2024 at 02:11 PM UTC
Updated: June 17, 2026 at 08:12 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.3%

Description

In the Linux kernel, the following vulnerability has been resolved: wifi: mwifiex: Fix memcpy() field-spanning write warning in mwifiex_config_scan() Replace one-element array with a flexible-array member in `struct mwifiex_ie_types_wildcard_ssid_params` to fix the following warning on a MT8173 Chromebook (mt8173-elm-hana): [ 356.775250] ------------[ cut here ]------------ [ 356.784543] memcpy: detected field-spanning write (size 6) of single field "wildcard_ssid_tlv->ssid" at drivers/net/wireless/marvell/mwifiex/scan.c:904 (size 1) [ 356.813403] WARNING: CPU: 3 PID: 742 at drivers/net/wireless/marvell/mwifiex/scan.c:904 mwifiex_scan_networks+0x4fc/0xf28 [mwifiex] The "(size 6)" above is exactly the length of the SSID of the network this device was connected to. The source of the warning looks like: ssid_len = user_scan_in->ssid_list[i].ssid_len; [...] memcpy(wildcard_ssid_tlv->ssid, user_scan_in->ssid_list[i].ssid, ssid_len); There is a #define WILDCARD_SSID_TLV_MAX_SIZE that uses sizeof() on this struct, but it already didn't account for the size of the one-element array, so it doesn't need to be changed.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

3.0 ≤ v < 4.19.3253.0 ≤ v < 5.10.2313.0 ≤ v < 5.15.1743.0 ≤ v < 5.4.2873.0 ≤ v < 6.1.1203.0 ≤ v < 6.11.113.0 ≤ v < 6.12.23.0 ≤ v < 6.133.0 ≤ v < 6.6.644.20 ≤ v < 5.4.2875.11 ≤ v < 5.15.1745.16 ≤ v < 6.1.1205.5 ≤ v < 5.10.2316.12 ≤ v < 6.12.26.2 ≤ v < 6.6.646.7 ≤ v < 6.11.113.05e6e3a92b9a4c9416b17f468fa5c7fa2233b8b4e
Vendor states this is fixed in 1de0ca1d7320a645ba2ee5954f64be08935b002a (fixed)
Vendor states this is fixed in 581261b2d6fdb4237b24fa13f5a5f87bf2861f2c (fixed)
Vendor states this is fixed in 5fa329c44e1e635da2541eab28b6cdb8464fc8d1 (fixed)
Vendor states this is fixed in a09760c513ae0f98c7082a1deace7fb6284ee866 (fixed)
Vendor states this is fixed in b466746cfb6be43f9a1457bbee52ade397fb23ea (fixed)
Vendor states this is fixed in c4698ef8c42e02782604bf4f8a489dbf6b0c1365 (fixed)
Vendor states this is fixed in d241a139c2e9f8a479f25c75ebd5391e6a448500 (fixed)
Vendor states this is fixed in d7774910c5583e61c5fe2571280366624ef48036 (fixed)
Vendor states this is fixed in e2de22e4b6213371d9e76f74a10ce817572a8d74 (fixed)
Vendor states this is fixed in 3.0 (unaffected)
Vendor states this is fixed in 4.19.325 (unaffected)
Vendor states this is fixed in 5.10.231 (unaffected)
Vendor states this is fixed in 5.15.174 (unaffected)
Vendor states this is fixed in 5.4.287 (unaffected)
Vendor states this is fixed in 6.1.120 (unaffected)
Vendor states this is fixed in 6.11.11 (unaffected)
Vendor states this is fixed in 6.12.2 (unaffected)
Vendor states this is fixed in 6.13 (unaffected)
Vendor states this is fixed in 6.6.64 (unaffected)

References (11)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/1de0ca1d7320a645ba2ee5954f64be08935b002a
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/581261b2d6fdb4237b24fa13f5a5f87bf2861f2c
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/5fa329c44e1e635da2541eab28b6cdb8464fc8d1
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a09760c513ae0f98c7082a1deace7fb6284ee866
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b466746cfb6be43f9a1457bbee52ade397fb23ea
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/c4698ef8c42e02782604bf4f8a489dbf6b0c1365
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/d241a139c2e9f8a479f25c75ebd5391e6a448500
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/d7774910c5583e61c5fe2571280366624ef48036

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
NVD-CWE-noinfo

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card