projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a85b854
)
wifi: mac80211: drop invalid source address OCB frames
author
Johannes Berg
<johannes.berg@intel.com>
Mon, 16 Jun 2025 15:18:38 +0000
(17:18 +0200)
committer
Johannes Berg
<johannes.berg@intel.com>
Tue, 17 Jun 2025 12:29:49 +0000
(14:29 +0200)
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>
net/mac80211/rx.c
patch
|
blob
|
blame
|
history
diff --git
a/net/mac80211/rx.c
b/net/mac80211/rx.c
index 09beb65d6108b41d039ba339270a7a4e2f8ba9d5..e73431549ce77e29346ee8f4d1273a18bef81991 100644
(file)
--- a/
net/mac80211/rx.c
+++ b/
net/mac80211/rx.c
@@
-4432,6
+4432,10
@@
static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx)
if (!multicast &&
!ether_addr_equal(sdata->dev->dev_addr, hdr->addr1))
return false;
+ /* reject invalid/our STA address */
+ if (!is_valid_ether_addr(hdr->addr2) ||
+ ether_addr_equal(sdata->dev->dev_addr, hdr->addr2))
+ return false;
if (!rx->sta) {
int rate_idx;
if (status->encoding != RX_ENC_LEGACY)