Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+4
+4
net/mac80211/rx.c
··· 4432 4432 if (!multicast && 4433 4433 !ether_addr_equal(sdata->dev->dev_addr, hdr->addr1)) 4434 4434 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; 4435 4439 if (!rx->sta) { 4436 4440 int rate_idx; 4437 4441 if (status->encoding != RX_ENC_LEGACY)