Skip to content

Commit 133767f

Browse files
jmberg-intelsmb49
authored andcommitted
wifi: mac80211: drop invalid source address OCB frames
BugLink: https://bugs.launchpad.net/bugs/2122072 [ 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: 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> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Noah Wager <noah.wager@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
1 parent 5a625ee commit 133767f

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
@@ -4407,6 +4407,10 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx)
44074407
if (!multicast &&
44084408
!ether_addr_equal(sdata->dev->dev_addr, hdr->addr1))
44094409
return false;
4410+
/* reject invalid/our STA address */
4411+
if (!is_valid_ether_addr(hdr->addr2) ||
4412+
ether_addr_equal(sdata->dev->dev_addr, hdr->addr2))
4413+
return false;
44104414
if (!rx->sta) {
44114415
int rate_idx;
44124416
if (status->encoding != RX_ENC_LEGACY)

0 commit comments

Comments
 (0)