[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_E870745776CD66CE3C1D36EE977437AA4A09@qq.com>
Date: Tue, 17 Jun 2025 11:23:10 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+6554b492c7008bcd3385@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [wireless?] UBSAN: array-index-out-of-bounds in ieee80211_rx_mgmt_beacon
#syz test
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 2d46d4af60d7..c370352b7d7d 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -7222,7 +7222,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_link_data *link,
if (ieee80211_is_s1g_beacon(mgmt->frame_control)) {
struct ieee80211_ext *ext = (void *) mgmt;
variable = ext->u.s1g_beacon.variable +
- ieee80211_s1g_optional_len(ext->frame_control);
+ (ieee80211_s1g_optional_len(ext->frame_control) - 1);
}
baselen = (u8 *) variable - (u8 *) mgmt;
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index ce377f7fb912..556ce95e0b0f 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -1278,7 +1278,7 @@ struct ieee80211_ext {
u8 sa[ETH_ALEN];
__le32 timestamp;
u8 change_seq;
- u8 variable[0];
+ u8 variable[4];
} __packed s1g_beacon;
} u;
} __packed __aligned(2);
Powered by blists - more mailing lists