Skip to content

Commit 7c1c73b

Browse files
committed
wifi: mac80211: check EHT/TTLM action frame length
Check the EHT action frame length before accessing the action code, if it's not present then the frame cannot be valid. Reported-by: syzbot+75af45a00cf13243ba39@syzkaller.appspotmail.com Closes: https://lore.kernel.org/r/0000000000006c06870614886611@google.com/ Fixes: 8f500fb ("wifi: mac80211: process and save negotiated TID to Link mapping request") Link: https://msgid.link/20240326213858.19c84f34349f.I71b439f016b28f65284bb7646fe36343b74cbc9a@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 50108c3 commit 7c1c73b

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
@@ -3780,6 +3780,10 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
37803780
}
37813781
break;
37823782
case WLAN_CATEGORY_PROTECTED_EHT:
3783+
if (len < offsetofend(typeof(*mgmt),
3784+
u.action.u.ttlm_req.action_code))
3785+
break;
3786+
37833787
switch (mgmt->u.action.u.ttlm_req.action_code) {
37843788
case WLAN_PROTECTED_EHT_ACTION_TTLM_REQ:
37853789
if (sdata->vif.type != NL80211_IFTYPE_STATION)

0 commit comments

Comments
 (0)