Skip to content

Commit d1b1a5e

Browse files
committed
wifi: mac80211: drop invalid source address OCB frames
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: syzbot+8b512026a7ec10dcbdd9@syzkaller.appspotmail.com Closes: https://lore.kernel.org/r/6788d2d9.050a0220.20d369.0028.GAE@google.com/ Signed-off-by: Johannes Berg <johannes.berg@intel.com> Tested-by: syzbot+8b512026a7ec10dcbdd9@syzkaller.appspotmail.com Link: https://patch.msgid.link/20250616171838.7433379cab5d.I47444d63c72a0bd58d2e2b67bb99e1fea37eec6f@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent a85b854 commit d1b1a5e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

net/mac80211/rx.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4432,6 +4432,10 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx)
44324432
if (!multicast &&
44334433
!ether_addr_equal(sdata->dev->dev_addr, hdr->addr1))
44344434
return false;
4435+
/* reject invalid/our STA address */
4436+
if (!is_valid_ether_addr(hdr->addr2) ||
4437+
ether_addr_equal(sdata->dev->dev_addr, hdr->addr2))
4438+
return false;
44354439
if (!rx->sta) {
44364440
int rate_idx;
44374441
if (status->encoding != RX_ENC_LEGACY)

0 commit comments

Comments
 (0)