Skip to content

Commit ce97dc3

Browse files
wifi: mac80211: check S1G action frame size
jira VULN-154637 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: Shreeya Patel <spatel@ciq.com>
1 parent e179f0d commit ce97dc3

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
@@ -3623,6 +3623,10 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
36233623
break;
36243624
goto queue;
36253625
case WLAN_CATEGORY_S1G:
3626+
if (len < offsetofend(typeof(*mgmt),
3627+
u.action.u.s1g.action_code))
3628+
break;
3629+
36263630
switch (mgmt->u.action.u.s1g.action_code) {
36273631
case WLAN_S1G_TWT_SETUP:
36283632
case WLAN_S1G_TWT_TEARDOWN:

0 commit comments

Comments
 (0)