wifi: cfg80211: advance loop vars in cfg80211_merge_profile()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ fe806e4992c9047affd263bcc13b2c047029a726 · < 6cfae4914439878b8acb35c7e3b40096eeb2ad9c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
wifi: cfg80211: advance loop vars in cfg80211_merge_profile()
cfg80211_merge_profile() reassembles a Multi-BSSID non-transmitted BSS profile that has been split across multiple consecutive MBSSID elements. Its while-loop calls
cfg80211_get_profile_continuation(ie, ielen, mbssid_elem, sub_elem)
but never advances mbssid_elem or sub_elem inside the body. Each iteration therefore searches for a continuation that follows the same fixed pair; the helper returns the same next_mbssid; and the same next_sub bytes are memcpy()'d into merged_ie at a growing offset until the buffer fills.
Advance both mbssid_elem and sub_elem to the just-consumed continuation so the next call to cfg80211_get_profile_continuation() searches for a further continuation beyond it (or returns NULL when none exists).
A specially-crafted malicious beacon can take advantage of this bug to cause the kernel to spend an excessive amount of time in cfg80211_merge_profile (up to as much as 2ms per beacon received), which could theoretically be abused in some way.
From the CVE record · Linux
A loop in the Linux kernel’s cfg80211_merge_profile() repeatedly copies the same Multi-BSSID profile continuation instead of advancing to the next one. An attacker transmitting a specially crafted wireless beacon could cause the kernel to spend up to 2 ms processing each received beacon.
Engineers running Linux kernels with the affected cfg80211 code should check their kernel vendor’s advisory; affected versions were not provided.