Skip to content

Commit 36b5259

Browse files
committed
wifi: mac80211: check/clear fast rx for non-4addr sta VLAN changes
jira LE-1907 cve CVE-2024-35789 Rebuild_History Non-Buildable kernel-5.14.0-427.31.1.el9_4 commit-author Felix Fietkau <nbd@nbd.name> commit 4f2bdb3 When moving a station out of a VLAN and deleting the VLAN afterwards, the fast_rx entry still holds a pointer to the VLAN's netdev, which can cause use-after-free bugs. Fix this by immediately calling ieee80211_check_fast_rx after the VLAN change. Cc: stable@vger.kernel.org Reported-by: ranygh@riseup.net Signed-off-by: Felix Fietkau <nbd@nbd.name> Link: https://msgid.link/20240316074336.40442-1-nbd@nbd.name Signed-off-by: Johannes Berg <johannes.berg@intel.com> (cherry picked from commit 4f2bdb3) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 5cc66fd commit 36b5259

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

net/mac80211/cfg.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2162,15 +2162,14 @@ static int ieee80211_change_station(struct wiphy *wiphy,
21622162
}
21632163

21642164
if (sta->sdata->vif.type == NL80211_IFTYPE_AP_VLAN &&
2165-
sta->sdata->u.vlan.sta) {
2166-
ieee80211_clear_fast_rx(sta);
2165+
sta->sdata->u.vlan.sta)
21672166
RCU_INIT_POINTER(sta->sdata->u.vlan.sta, NULL);
2168-
}
21692167

21702168
if (test_sta_flag(sta, WLAN_STA_AUTHORIZED))
21712169
ieee80211_vif_dec_num_mcast(sta->sdata);
21722170

21732171
sta->sdata = vlansdata;
2172+
ieee80211_check_fast_rx(sta);
21742173
ieee80211_check_fast_xmit(sta);
21752174

21762175
if (test_sta_flag(sta, WLAN_STA_AUTHORIZED)) {

0 commit comments

Comments
 (0)