]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mac80211: drop robust management frames from unknown TA
authorJohannes Berg <johannes.berg@intel.com>
Wed, 13 Feb 2019 14:13:30 +0000 (15:13 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 14 Jun 2019 13:46:33 +0000 (15:46 +0200)
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 <johannes.berg@intel.com>
net/mac80211/rx.c

index 25577ede2986ec5616a94501145a9734ec402521..fd3740000e877064360e9d3de7bcf8d8a76ca4cb 100644 (file)
@@ -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);