Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3799154pxv; Mon, 28 Jun 2021 13:11:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGR99yJgQUAgSTOEhGJovbDE/4VLMRkjkJPMHj5/s4pw8E3U2vvWJ4SZz2kpcVQsgkcv/V X-Received: by 2002:a92:1901:: with SMTP id 1mr19507324ilz.237.1624911098208; Mon, 28 Jun 2021 13:11:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624911098; cv=none; d=google.com; s=arc-20160816; b=GYhV6XgruPVfsCa23DUtgkWdGzPahvTtR/A9LaMmCEng8FcIYBU3UV5sJ9akCli14F cc6pOyaNObfRGbUpU9dm7oAcOv+eKNhlCNOSRVHSUi5RuPn7nf2QzafuRLwLYlOMLFXn wKfv8S3nQdKYuE73HlIJxk6WMUPj+nVsQbSHWVFkYQC7bKTccy59i95+uUan3tgLBPV+ DeAM9S2KmUOF4YSq6MPwiiQEKVy9gzpIQ/bZikwaTbsKJKKJwNySLw1Dy30AaWRyTIyx kwh+CaXq+RG10xfeqTNTlwtZqxh99JgqJdfPFVoSwvKzBiO52m6xfYXiAmNhAB0Syc+T zaCA== 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=Ua/N597Mr99t+nvGqUmco8713AoQmG61MkQt+mavFdo=; b=vvXXvpwZqSX+IbeGe8qMIRk9Xv2s/SqdfXe7oGWXRJ6tT8mU0zeACxuPuUt97FIQDm Ym4SRiu9PAQbAY0YW72GAWBXtc0ABWUVHdX/B50z3vhLjQtXS14vWEh5NNe5/YJPJ4vE YTy87SmaiSr74p9QFFbZtjCZkLYBjNxpaWzFnHNG/9Kzx0K5Azl6Um1uyjTwZn7y66CX 9D1fX+avaD6vV33kWfuRdOVZj6xzMqagUPNIpMAjmVvvW63AjzmUzWv/5dYXg+qVqg92 nyuQcoiWCW9UuHhN0J4XVUB4N6gQArtzozjf+dOIaB+uV4vOGQYjnUJKkhYXyJ9RObpS V6mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kcPfst+v; 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 h13si18042424jas.116.2021.06.28.13.10.48; Mon, 28 Jun 2021 13:11:38 -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=kcPfst+v; 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 S236805AbhF1PCq (ORCPT + 99 others); Mon, 28 Jun 2021 11:02:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:51696 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236089AbhF1OqO (ORCPT ); Mon, 28 Jun 2021 10:46:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D33B161C96; Mon, 28 Jun 2021 14:34:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624890868; bh=ltZV6Jt4ghxEh3yLIw/23FrPMnxa2xTgM43AU+i0y1c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kcPfst+vEv/5jxMJIpCzB1YgeE9G0xn/O/nn0I/1+BMrIean8lVccjUn2UQGmYVN6 C+fXXIc771FNeV0MqKzRhYpeubGu3BOMJwHUy8Jh2bIqZx3K5twog4BgAe5vlMytZp Fq6OOypEGCPFiM2fjg+mPbn9PMdmvOmhOd9rBSE77Xm0ZGzmKEef0W1eXVV72l3zBw pR5XGuvxOKRfD4SxJWBDwCqoDelWyN3Mme+V91awa2msGOyrvXPfO9uuhNS3TlLv6g Bhq7dnDxewkGsnN9JAuAnaJApqNbaCuy5yKwDSPPwUUzUEMybO8lsFJIWKQCucM/V/ LdkWRjl/22j8Q== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Johannes Berg , Sasha Levin Subject: [PATCH 4.19 092/109] mac80211: drop multicast fragments Date: Mon, 28 Jun 2021 10:32:48 -0400 Message-Id: <20210628143305.32978-93-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628143305.32978-1-sashal@kernel.org> References: <20210628143305.32978-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.196-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.19.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.19.196-rc1 X-KernelTest-Deadline: 2021-06-30T14:32+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 2ba19decb126..012697efafc3 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -2124,17 +2124,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)) @@ -2260,7 +2258,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