Message ID | 20210525174625.69071-10-cascardo@canonical.com |
---|---|
State | Accepted |
Headers | show |
Series | [SRU,Hirsute,Groovy,Focal/linux-oem-5.10,Focal/linux-oem-5.6,Focal,01/16] mac80211: assure all fragments are encrypted | expand |
diff --git a/net/wireless/util.c b/net/wireless/util.c index 03a5c8d30589..a83cb927d853 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -771,6 +771,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;