Message ID | 20210531203021.180010-5-johannes@sipsolutions.net |
---|---|
State | New |
Headers | show |
Series | [v4.14,01/10] mac80211: assure all fragments are encrypted | expand |
diff --git a/net/wireless/util.c b/net/wireless/util.c index 8c67b7cf1def..939320571d71 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -769,6 +769,9 @@ void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list, remaining = skb->len - offset; if (subframe_len > remaining) goto purge; + /* mitigate A-MSDU aggregation injection attacks */ + if (ether_addr_equal(eth.h_dest, rfc1042_header)) + goto purge; offset += sizeof(struct ethhdr); last = remaining <= subframe_len + padding;