From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Johannes Berg <johannes.berg@intel.com>,
Sasha Levin <sashal@kernel.org>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 5.4 10/26] mac80211: drop multicast fragments
Date: Mon, 21 Jun 2021 13:53:43 -0400 [thread overview]
Message-ID: <20210621175400.735800-10-sashal@kernel.org> (raw)
In-Reply-To: <20210621175400.735800-1-sashal@kernel.org>
From: Johannes Berg <johannes.berg@intel.com>
[ Upstream commit a9799541ca34652d9996e45f80e8e03144c12949 ]
These are not permitted by the spec, just drop them.
Link: https://lore.kernel.org/r/20210609161305.23def022b750.Ibd6dd3cdce573dae262fcdc47f8ac52b883a9c50@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/rx.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 3d7a5c5e586a..670d84e54db7 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2200,17 +2200,15 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx)
sc = le16_to_cpu(hdr->seq_ctrl);
frag = sc & IEEE80211_SCTL_FRAG;
- if (is_multicast_ether_addr(hdr->addr1)) {
- I802_DEBUG_INC(rx->local->dot11MulticastReceivedFrameCount);
- goto out_no_led;
- }
-
if (rx->sta)
cache = &rx->sta->frags;
if (likely(!ieee80211_has_morefrags(fc) && frag == 0))
goto out;
+ if (is_multicast_ether_addr(hdr->addr1))
+ return RX_DROP_MONITOR;
+
I802_DEBUG_INC(rx->local->rx_handlers_fragments);
if (skb_linearize(rx->skb))
@@ -2336,7 +2334,6 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx)
out:
ieee80211_led_rx(rx->local);
- out_no_led:
if (rx->sta)
rx->sta->rx_stats.packets++;
return RX_CONTINUE;
--
2.30.2
next prev parent reply other threads:[~2021-06-21 17:59 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-21 17:53 [PATCH AUTOSEL 5.4 01/26] dmaengine: zynqmp_dma: Fix PM reference leak in zynqmp_dma_alloc_chan_resourc() Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 02/26] mac80211: remove warning in ieee80211_get_sband() Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 03/26] mac80211_hwsim: drop pending frames on stop Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 04/26] cfg80211: call cfg80211_leave_ocb when switching away from OCB Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 05/26] dmaengine: rcar-dmac: Fix PM reference leak in rcar_dmac_probe() Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 06/26] dmaengine: mediatek: free the proper desc in desc_free handler Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 07/26] dmaengine: mediatek: do not issue a new desc if one is still current Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 08/26] dmaengine: mediatek: use GFP_NOWAIT instead of GFP_ATOMIC in prep_dma Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 09/26] net: ipv4: Remove unneed BUG() function Sasha Levin
2021-06-21 17:53 ` Sasha Levin [this message]
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 11/26] net: ethtool: clear heap allocations for ethtool function Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 12/26] ping: Check return value of function 'ping_queue_rcv_skb' Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 13/26] inet: annotate date races around sk->sk_txhash Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 14/26] net: phy: dp83867: perform soft reset and retain established link Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 15/26] net: caif: fix memory leak in ldisc_open Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 16/26] net/packet: annotate accesses to po->bind Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 17/26] net/packet: annotate accesses to po->ifindex Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 18/26] r8152: Avoid memcpy() over-reading of ETH_SS_STATS Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 19/26] sh_eth: " Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 20/26] r8169: " Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 21/26] KVM: selftests: Fix kvm_check_cap() assertion Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 22/26] net: qed: Fix memcpy() overflow of qed_dcbx_params() Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 23/26] recordmcount: Correct st_shndx handling Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 24/26] PCI: Add AMD RS690 quirk to enable 64-bit DMA Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 25/26] net: ll_temac: Add memory-barriers for TX BD access Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.4 26/26] net: ll_temac: Avoid ndo_start_xmit returning NETDEV_TX_BUSY Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210621175400.735800-10-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=johannes.berg@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).