From: Johannes Berg Date: Wed, 13 Feb 2019 14:13:30 +0000 (+0100) Subject: mac80211: drop robust management frames from unknown TA X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=588f7d39b3592a36fb7702ae3b8bdd9be4621e2f;p=openwrt%2Fstaging%2Fblogic.git mac80211: drop robust management frames from unknown TA When receiving a robust management frame, drop it if we don't have rx->sta since then we don't have a security association and thus couldn't possibly validate the frame. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 25577ede2986..fd3740000e87 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -3831,6 +3831,8 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx) case NL80211_IFTYPE_STATION: if (!bssid && !sdata->u.mgd.use_4addr) return false; + if (ieee80211_is_robust_mgmt_frame(skb) && !rx->sta) + return false; if (multicast) return true; return ether_addr_equal(sdata->vif.addr, hdr->addr1);