Skip to contentSkip to conversation

mac80211: drop robust management frames from unknown TA

PATCH New Johannes Berg 1 participant 1 message Jun 12, 2019 mac80211

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 mac80211: drop robust management frames from unknown TA

From: Johannes Berg <[email protected]>

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.

---
 net/mac80211/rx.c | 2 ++
 1 file changed, 2 insertions(+)
net/mac80211/rx.c +2 -0
index 25577ede2986..fd3740000e87 100644
@@ -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);
Signature · 1 line
2.17.2