Skip to content

Commit f3ef68b

Browse files
CIQ Kernel Automationroxanan1996
authored andcommitted
wifi: mac80211: use safe list iteration in radar detect work
jira VULN-188783 cve CVE-2026-46166 commit-author Benjamin Berg <benjamin.berg@intel.com> commit ac8eb3e The call to ieee80211_dfs_cac_cancel can cause the iterated chanctx to be freed and removed from the list. Guard against this to avoid a slab-use-after-free error. Cc: stable@vger.kernel.org Fixes: bca8bc0 ("wifi: mac80211: handle ieee80211_radar_detected() for MLO") Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Link: https://patch.msgid.link/20260505151539.236d63a1b736.I35dbb9e96a2d4a480be208770fdd99ba3b817b79@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com> (cherry picked from commit ac8eb3e) Signed-off-by: CIQ Kernel Automation <ciq_kernel_automation@ciq.com>
1 parent b276bd2 commit f3ef68b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

net/mac80211/util.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3501,11 +3501,11 @@ void ieee80211_dfs_radar_detected_work(struct wiphy *wiphy,
35013501
struct ieee80211_local *local =
35023502
container_of(work, struct ieee80211_local, radar_detected_work);
35033503
struct cfg80211_chan_def chandef;
3504-
struct ieee80211_chanctx *ctx;
3504+
struct ieee80211_chanctx *ctx, *tmp;
35053505

35063506
lockdep_assert_wiphy(local->hw.wiphy);
35073507

3508-
list_for_each_entry(ctx, &local->chanctx_list, list) {
3508+
list_for_each_entry_safe(ctx, tmp, &local->chanctx_list, list) {
35093509
if (ctx->replace_state == IEEE80211_CHANCTX_REPLACES_OTHER)
35103510
continue;
35113511

0 commit comments

Comments
 (0)