CVE-2023-52531
Severity CVSS v4.0:
Pending analysis
Type:
CWE-787
Out-of-bounds Write
Publication date:
02/03/2024
Last modified:
11/12/2024
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
wifi: iwlwifi: mvm: Fix a memory corruption issue<br />
<br />
A few lines above, space is kzalloc()&#39;ed for:<br />
sizeof(struct iwl_nvm_data) +<br />
sizeof(struct ieee80211_channel) +<br />
sizeof(struct ieee80211_rate)<br />
<br />
&#39;mvm->nvm_data&#39; is a &#39;struct iwl_nvm_data&#39;, so it is fine.<br />
<br />
At the end of this structure, there is the &#39;channels&#39; flex array.<br />
Each element is of type &#39;struct ieee80211_channel&#39;.<br />
So only 1 element is allocated in this array.<br />
<br />
When doing:<br />
mvm->nvm_data->bands[0].channels = mvm->nvm_data->channels;<br />
We point at the first element of the &#39;channels&#39; flex array.<br />
So this is fine.<br />
<br />
However, when doing:<br />
mvm->nvm_data->bands[0].bitrates =<br />
(void *)((u8 *)mvm->nvm_data->channels + 1);<br />
because of the "(u8 *)" cast, we add only 1 to the address of the beginning<br />
of the flex array.<br />
<br />
It is likely that we want point at the &#39;struct ieee80211_rate&#39; allocated<br />
just after.<br />
<br />
Remove the spurious casting so that the pointer arithmetic works as<br />
expected.
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 3.9 (including) | 5.15.135 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.57 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.5.7 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.6:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.6:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.6:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.6:rc4:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/6b3223449c959a8be94a1f042288059e40fcccb0
- https://git.kernel.org/stable/c/7c8faa31080342aec4903c9acb20caf82fcca1ef
- https://git.kernel.org/stable/c/8ba438ef3cacc4808a63ed0ce24d4f0942cfe55d
- https://git.kernel.org/stable/c/f06cdd8d4ba5252986f51f80cc30263636397128
- https://git.kernel.org/stable/c/6b3223449c959a8be94a1f042288059e40fcccb0
- https://git.kernel.org/stable/c/7c8faa31080342aec4903c9acb20caf82fcca1ef
- https://git.kernel.org/stable/c/8ba438ef3cacc4808a63ed0ce24d4f0942cfe55d
- https://git.kernel.org/stable/c/f06cdd8d4ba5252986f51f80cc30263636397128



