Skip to content

Commit 7b131d8

Browse files
jmberg-intelgregkh
authored andcommitted
wifi: mac80211: drop invalid source address OCB frames
[ Upstream commit d1b1a5eb27c4948e8811cf4dbb05aaf3eb10700c ] In OCB, don't accept frames from invalid source addresses (and in particular don't try to create stations for them), drop the frames instead. Reported-by: [email protected] Closes: https://lore.kernel.org/r/[email protected]/ Signed-off-by: Johannes Berg <[email protected]> Tested-by: [email protected] Link: https://patch.msgid.link/20250616171838.7433379cab5d.I47444d63c72a0bd58d2e2b67bb99e1fea37eec6f@changeid Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 2148b91 commit 7b131d8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

net/mac80211/rx.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4336,6 +4336,10 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx)
43364336
if (!multicast &&
43374337
!ether_addr_equal(sdata->dev->dev_addr, hdr->addr1))
43384338
return false;
4339+
/* reject invalid/our STA address */
4340+
if (!is_valid_ether_addr(hdr->addr2) ||
4341+
ether_addr_equal(sdata->dev->dev_addr, hdr->addr2))
4342+
return false;
43394343
if (!rx->sta) {
43404344
int rate_idx;
43414345
if (status->encoding != RX_ENC_LEGACY)

0 commit comments

Comments
 (0)