Skip to content

Commit 0073887

Browse files
committed
wifi: mac80211: check S1G action frame size
jira VULN-154631 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: Roxana Nicolescu <rnicolescu@ciq.com>
1 parent 0e53a86 commit 0073887

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
@@ -3551,6 +3551,10 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
35513551
break;
35523552
goto queue;
35533553
case WLAN_CATEGORY_S1G:
3554+
if (len < offsetofend(typeof(*mgmt),
3555+
u.action.u.s1g.action_code))
3556+
break;
3557+
35543558
switch (mgmt->u.action.u.s1g.action_code) {
35553559
case WLAN_S1G_TWT_SETUP:
35563560
case WLAN_S1G_TWT_TEARDOWN:

0 commit comments

Comments
 (0)