From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E59C13BF2FA; Thu, 15 Jan 2026 17:36:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768498575; cv=none; b=URNF5NGT5EEUV3BAY4TqNcK1dcVDrbObhX+9EBheonR7bcnsbGBa2LHoX8ANZGJio67w1GyJ75pQS13FbfC5BZXJiV66zsM+ltGIlsVPSebstNYSNXxZE6g0m/sq7kIzKnJavJZXQjkHfOiuW1CQ2xvmKawOR6aSjCNt5kISyag= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768498575; c=relaxed/simple; bh=sr1gSCrKQUMMyQqGGhJJr/BoumKLrKi6nz2tUlE1AB8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QaMk0C4+cAEsrKQIQknGS2BQESuaCm2dnLkWxswnqH2Zpa8q3y+95zBYaiQSRCKOwOlI3tKoCA7SN536t3MEXKW68OC7z7JyhMgb6WMK1vy8+QOBsqEroi/J/LbXAPN+i8SLmvcG4z+JCwMaeyl9qDq4jEXGFcSYSegbqnqe27c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=zYkKf2Rw; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="zYkKf2Rw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10096C116D0; Thu, 15 Jan 2026 17:36:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1768498574; bh=sr1gSCrKQUMMyQqGGhJJr/BoumKLrKi6nz2tUlE1AB8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zYkKf2RwE2FwxsTk5WG26DE2neJjwgyyS86NWeau7U+PR1lQ2hUOWUxS8algKKb+y K+JO/IfNTMcVoX2EXNgqtWS9BnNiOvFZRN1wOON0RJgjHUZ/y3LRgIhxl3L2gqEZqM Px1X+WbOxbsRZzw8mvqeYnnuN3kDJpo1h0N08gbE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jouni Malinen , Johannes Berg , Sasha Levin Subject: [PATCH 5.15 479/554] wifi: mac80211: Discard Beacon frames to non-broadcast address Date: Thu, 15 Jan 2026 17:49:05 +0100 Message-ID: <20260115164303.644961838@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260115164246.225995385@linuxfoundation.org> References: <20260115164246.225995385@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jouni Malinen [ Upstream commit 193d18f60588e95d62e0f82b6a53893e5f2f19f8 ] Beacon frames are required to be sent to the broadcast address, see IEEE Std 802.11-2020, 11.1.3.1 ("The Address 1 field of the Beacon .. frame shall be set to the broadcast address"). A unicast Beacon frame might be used as a targeted attack to get one of the associated STAs to do something (e.g., using CSA to move it to another channel). As such, it is better have strict filtering for this on the received side and discard all Beacon frames that are sent to an unexpected address. This is even more important for cases where beacon protection is used. The current implementation in mac80211 is correctly discarding unicast Beacon frames if the Protected Frame bit in the Frame Control field is set to 0. However, if that bit is set to 1, the logic used for checking for configured BIGTK(s) does not actually work. If the driver does not have logic for dropping unicast Beacon frames with Protected Frame bit 1, these frames would be accepted in mac80211 processing as valid Beacon frames even though they are not protected. This would allow beacon protection to be bypassed. While the logic for checking beacon protection could be extended to cover this corner case, a more generic check for discard all Beacon frames based on A1=unicast address covers this without needing additional changes. Address all these issues by dropping received Beacon frames if they are sent to a non-broadcast address. Cc: stable@vger.kernel.org Fixes: af2d14b01c32 ("mac80211: Beacon protection using the new BIGTK (STA)") Signed-off-by: Jouni Malinen Link: https://patch.msgid.link/20251215151134.104501-1-jouni.malinen@oss.qualcomm.com Signed-off-by: Johannes Berg [ adapted RX_DROP return value to RX_DROP_MONITOR ] Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- net/mac80211/rx.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -3193,6 +3193,11 @@ ieee80211_rx_h_mgmt_check(struct ieee802 if (!ieee80211_is_mgmt(mgmt->frame_control)) return RX_DROP_MONITOR; + /* Drop non-broadcast Beacon frames */ + if (ieee80211_is_beacon(mgmt->frame_control) && + !is_broadcast_ether_addr(mgmt->da)) + return RX_DROP_MONITOR; + if (rx->sdata->vif.type == NL80211_IFTYPE_AP && ieee80211_is_beacon(mgmt->frame_control) && !(rx->flags & IEEE80211_RX_BEACON_REPORTED)) {