CVE-2023-52531: wifi: iwlwifi: mvm: Fix a memory corruption issue
In the Linux kernel, the following vulnerability has been resolved:
wifi: iwlwifi: mvm: Fix a memory corruption issue
A few lines above, space is kzalloc()'ed for: sizeof(struct iwlnvmdata) + sizeof(struct ieee80211channel) + sizeof(struct ieee80211rate)
'mvm->nvmdata' is a 'struct iwlnvmdata', so it is fine.
At the end of this structure, there is the 'channels' flex array. Each element is of type 'struct ieee80211channel'. So only 1 element is allocated in this array.
When doing: mvm->nvmdata->bands[0].channels = mvm->nvmdata->channels; We point at the first element of the 'channels' flex array. So this is fine.
However, when doing: mvm->nvmdata->bands[0].bitrates = (void )((u8 )mvm->nvmdata->channels + 1); because of the "(u8 )" cast, we add only 1 to the address of the beginning of the flex array.
It is likely that we want point at the 'struct ieee80211rate' allocated just after.
Remove the spurious casting so that the pointer arithmetic works as expected.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1 - Compensating control
In the Linux kernel iwlwifi mvm code, remove the spurious (u8 *) cast from the assignment to mvm->nvm_data->bands[0].bitrates so pointer arithmetic advances by sizeof(struct ieee80211_channel) and points to the struct ieee80211_rate allocated after the channels flex array.
Event History
Frequently Asked Questions
What is the severity of CVE-2023-52531?
CVE-2023-52531 has a high severity level due to the potential for memory corruption in the Linux kernel.
How do I fix CVE-2023-52531?
To fix CVE-2023-52531, upgrade to a patched version of the Linux kernel such as 6.1.123-1, 6.1.128-1, or 6.12.12-1.
Which versions of the Linux kernel are affected by CVE-2023-52531?
CVE-2023-52531 affects Linux kernel versions from 3.9 up to 6.5.7 and specific release candidates of 6.6.
Is CVE-2023-52531 exploitable remotely?
Yes, CVE-2023-52531 could potentially be exploited remotely, depending on the specific configurations of the affected systems.
What are the potential impacts of CVE-2023-52531?
The impacts of CVE-2023-52531 can include system crashes and unauthorized access due to memory corruption.