Skip to content

Commit 5771858

Browse files
committed
wifi: mac80211: check S1G action frame size
jira VULN-154634 cve CVE-2023-53257 commit-author Johannes Berg <johannes.berg@intel.com> commit 19e4a47 Before checking the action code, check that it even exists in the frame. Reported-by: syzbot+be9c824e6f269d608288@syzkaller.appspotmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> (cherry picked from commit 19e4a47) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent d2c2dba commit 5771858

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
@@ -3555,6 +3555,10 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
35553555
break;
35563556
goto queue;
35573557
case WLAN_CATEGORY_S1G:
3558+
if (len < offsetofend(typeof(*mgmt),
3559+
u.action.u.s1g.action_code))
3560+
break;
3561+
35583562
switch (mgmt->u.action.u.s1g.action_code) {
35593563
case WLAN_S1G_TWT_SETUP:
35603564
case WLAN_S1G_TWT_TEARDOWN:

0 commit comments

Comments
 (0)