Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3862829pxv; Mon, 28 Jun 2021 15:02:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJza6RDa575Uf1gOSPGfJESfls9D6SqlvnsUB2kl89r+JBJUyxBtQniOH4+hyz/ysw5yJw+O X-Received: by 2002:a17:906:cc59:: with SMTP id mm25mr26202299ejb.331.1624917778673; Mon, 28 Jun 2021 15:02:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624917778; cv=none; d=google.com; s=arc-20160816; b=ZwknhxyIv+UC3ZVU6ZwEwhVa9CxgAFXBaZUCMvbqT5iZyoDAM6aGpqVh+N0cSRFFOu ygWBqHtzNpb8gUp52pP0t1Hum9F9Kzu2YbxNaMw1LAUhKIdR2LXnACAzY4dznqdqkRQW eBBaTpB/6CjNgm76PesSmBjEt/ZqHDGMRJc53LSC+G2YmpJ+wYyNX7KY4qAEsWX/+dKe 0T6Z7oFbcrHvPpy9j6VG38Sho4JfBV2GaQAc3siYzDmNo7YSOWx7qXqXyRfID28cEds2 n+cTvpc+/OM0AwStDT/k+uWzH6ZIT/JRsU0dK52woaemn+f4glqBlf94YR6WdLnkqDpl zzag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iT5yNXl+2yF5Xmi8FHAC+A6k3YCG3kN+CG85QzX0pnk=; b=bWYxqLxxHD9mvdPZ8XDcmVAvm3xf9yk3Ikb5PESrm9w/wIASdxgjI9mZMrksHHxOLX +O77rBhl0eaUpwya7mgqHbjKSglkG/kCETvke3FZ0ZBtmNePCZEsGGA+AiUlz45Lu4jc H0K9Lrxpr+fc3vCvYe2Shq1U8HtgzfX/snVSkEmysB3gk0w+kE54HgQrPITkacCNI9CG Edw+zDcDOZO7hEKlqBq1EJegenuPgRWT+/B6PArIBxpl3kFjkwbMPzOESfgmjrzSmLaF mnE4L672Fr0Cehw8Bhho5eEvgI+7sVV/yRS+Tqyzibt70T7ggC59BlHl5B44rfRZjrTt V4Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H13XXLkz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 12si13326284ejm.714.2021.06.28.15.02.30; Mon, 28 Jun 2021 15:02:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H13XXLkz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238579AbhF1PYd (ORCPT + 99 others); Mon, 28 Jun 2021 11:24:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:34938 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235101AbhF1PAi (ORCPT ); Mon, 28 Jun 2021 11:00:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1911B61D70; Mon, 28 Jun 2021 14:40:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891255; bh=q4Ch5aLwhkpOI3OBAmrvkqhgZqn6fNoRPF7U7SBdh5U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H13XXLkzRiuMQ8aj6ziJO+pc6fAP1tajv6Sxnpc2pFjhR9bWjZgdD8YcUQvoT7xZA tBimytL76Ungt9cDlJ3aaZ49C+MiNLEs5U4mO2Mfm/62NDY37DCdZmuJh09REt9neA e8hXFverWafWXE9XQbr9uW1lJ/Tn0SP8UH1qZcUsaMdjfcU//Jj+c/CwRiIlK5zk8M uFo4UCIU7GA/RNXcx+D2kAFKA1xqn5ZCGunlWuhKOq67p4+Pmfg0OlOLr7o6xQ9/li lS3aJLnHM1jBWcZroyc7Po58JiHAMIqPgk3fnbWhdbAmUczIolmBz1cwwxZEvQaUh/ mrRZVlLMhgVXg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Johannes Berg , Sasha Levin Subject: [PATCH 4.9 58/71] mac80211: drop multicast fragments Date: Mon, 28 Jun 2021 10:39:50 -0400 Message-Id: <20210628144003.34260-59-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628144003.34260-1-sashal@kernel.org> References: <20210628144003.34260-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.274-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.9.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.9.274-rc1 X-KernelTest-Deadline: 2021-06-30T14:39+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johannes Berg [ 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 Signed-off-by: Sasha Levin --- 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 721caa5a5430..3a069cb188b7 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -1988,17 +1988,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)) @@ -2127,7 +2125,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