Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3837327pxv; Mon, 28 Jun 2021 14:17:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQGMmeqV/DUZ5YerGFEBusTXTRj+2QZG7DBail24n7QIEzwY4Ts6vj81VeyO0L8N/vd3Y6 X-Received: by 2002:a92:194b:: with SMTP id e11mr18632790ilm.38.1624915028090; Mon, 28 Jun 2021 14:17:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624915028; cv=none; d=google.com; s=arc-20160816; b=nCWKMWoFaWdlKEiyiHp0Q9pGVesuYQe2QGxjMmfjxTJpfWqBM0IwqL3/j8atjFkBYl iQnL9zsV0HQdsVSEWDB+o2p5a/kEYbem/vjZmuKY/HMM0rgArnUF/rY2/hUlR3Y2ELyK x7M+NN6Vl4MioYTAgdfLs+Du5yGTph7dwMKwLY1coVp+2yv/Ey8UsMxVJyjegz3ostHc mEwYnNzTuMIzgPpy/mSITZtnTzg4ZUfxwJX1hxsDLFMgvLz/r25VkUMqoAB8w0Em0Un6 nQ8poGtHhHimO9VPsSKfqT9Y5Wp5KOT7yblMUkPzhfaNyDFfaqDdv2KBZypRKglEq7Ad CVCQ== 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=uIN+KY+sMsECd87b2eQSL7F6FictkFA/VvNzBzaNNxk=; b=ypo+VZltIFFSrlJyXbJrUa0B3oT7v7EjDnVclyqPH3pN2XD1rxVAeMZf1uHqdE8JCk ANAVAMHmes09bxoAhZpbl0ZLYLIDGrCiLYQvT3960n2LhZP3YH2rPrigAR202js1Wt37 8VAAnlJ1QY3Eyac/YSXUdFc7hSRRT99aBMda/U/B3NMdRt2AN0NDui+t7fH9cG+HlKAj qv1yPR5ctULPnxxNcqXMTtz6eFFG9L6vYq1G1/3nyqXNhUVvP1wFPmveIo1ZxPFhLRof 1PVxclhDXDkDQPIGkRgFS4YSI4L7fAGd70eM/wAfi0/n1a0Kt5sryP4JY7tQ1E2KqLOj 5k/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i7usfBKP; 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 c26si6141324ioo.54.2021.06.28.14.16.55; Mon, 28 Jun 2021 14:17:08 -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=i7usfBKP; 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 S238144AbhF1PP3 (ORCPT + 99 others); Mon, 28 Jun 2021 11:15:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:33814 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235980AbhF1OyZ (ORCPT ); Mon, 28 Jun 2021 10:54:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9E5C961D45; Mon, 28 Jun 2021 14:37:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891054; bh=syClMTPN6fkpyBoEA0OAmpus6RlWaMNyrOQARjvAiIo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i7usfBKPBk5RC26NjYM/SdqKtesM7hcRYQglXa3VgfkAmEMqmxeSvya4VuUyd9646 s8Wka1oMjObfYIxfUwOqKsZL2YqLDmpnziLDsWW9/2CiWS12wLdQhAlL0dju1oiXXA NACJp+D4vOc9PBfGO057o76ss6jnqcon8tcbxRSqU/Of6CbtOBlk66LhJmevPii8Ax 9K6l0UBj1MQi9EpaDpum/9PJ1/TXOQ6fYJW3ZF2Z9qVQJ+Su1Jd8MokcA5PsxvN8DH //vnCSblfOFbzyn87aQEUWLZCxCbyQd/aT2hCBIwwa3NI1JSs8RAZqf/M72rQO1lb6 WLb/mK5oWzU+g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Johannes Berg , Sasha Levin Subject: [PATCH 4.14 74/88] mac80211: drop multicast fragments Date: Mon, 28 Jun 2021 10:36:14 -0400 Message-Id: <20210628143628.33342-75-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628143628.33342-1-sashal@kernel.org> References: <20210628143628.33342-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.238-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.14.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.14.238-rc1 X-KernelTest-Deadline: 2021-06-30T14:36+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 6b4fd56800f7..ac2c52709e1c 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -2014,17 +2014,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)) @@ -2150,7 +2148,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