diff options
author | Johannes Berg <johannes.berg@intel.com> | 2019-02-13 15:13:30 +0100 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2019-09-23 21:12:09 +0100 |
commit | 62909f7d0b1360ddb147bae8f546228dd93588e1 (patch) | |
tree | 37fa491617565cfed2210d07a11ec3a363861e9d /net | |
parent | 4ddb257573f61238bca2e3482e2f9cd94627f936 (diff) |
mac80211: drop robust management frames from unknown TA
commit 588f7d39b3592a36fb7702ae3b8bdd9be4621e2f upstream.
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.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/rx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 87d1722b6b1b..6b52b8d379e7 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -3084,6 +3084,8 @@ static bool prepare_for_handlers(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 && !ether_addr_equal(sdata->vif.addr, hdr->addr1)) { if (!(sdata->dev->flags & IFF_PROMISC) || |