From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+6554b492c7008bcd3385@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [wireless?] UBSAN: array-index-out-of-bounds in ieee80211_rx_mgmt_beacon
Date: Tue, 17 Jun 2025 11:23:10 +0800 [thread overview]
Message-ID: <tencent_E870745776CD66CE3C1D36EE977437AA4A09@qq.com> (raw)
In-Reply-To: <68504add.a70a0220.395abc.01e7.GAE@google.com>
#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);
next prev parent reply other threads:[~2025-06-17 3:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-16 16:48 syzbot
2025-06-17 1:12 ` Edward Adam Davis
2025-06-17 1:31 ` syzbot
2025-06-17 2:15 ` Edward Adam Davis
2025-06-17 2:53 ` syzbot
2025-06-17 3:23 ` Edward Adam Davis [this message]
2025-06-17 3:46 ` syzbot
2025-06-17 4:41 ` [PATCH] wifi: mac80211: fix oob " Edward Adam Davis
2025-06-17 6:31 ` Johannes Berg
2025-06-17 6:45 ` Lachlan Hodges
2025-06-17 7:46 ` [syzbot] [wireless?] UBSAN: array-index-out-of-bounds " Edward Adam Davis
2025-06-17 8:09 ` syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_E870745776CD66CE3C1D36EE977437AA4A09@qq.com \
--to=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+6554b492c7008bcd3385@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®