From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+4bcdddd48bb6f0be0da1@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_request_ibss_scan
Date: Wed, 7 May 2025 21:23:19 +0800 [thread overview]
Message-ID: <tencent_E9E91EEE86CD84787A6EF82C196CD494640A@qq.com> (raw)
In-Reply-To: <680fd171.050a0220.2b69d1.045e.GAE@google.com>
#syz test
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index cb7079071885..88ee1ce44e8e 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -369,6 +369,9 @@ static bool ieee80211_prep_hw_scan(struct ieee80211_sub_if_data *sdata)
return false;
if (ieee80211_hw_check(&local->hw, SINGLE_SCAN_ON_ALL_BANDS)) {
+ if (WARN_ON_ONCE(req->n_channels == 0))
+ return -EINVAL;
+
local->hw_scan_req->req.n_channels = req->n_channels;
for (i = 0; i < req->n_channels; i++) {
@@ -760,6 +763,9 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
/* None of the channels are actually set
* up but let UBSAN know the boundaries.
*/
+ if (WARN_ON_ONCE(req->n_channels == 0))
+ return -EINVAL;
+
local->hw_scan_req->req.n_channels = req->n_channels;
ies = (u8 *)local->hw_scan_req +
next prev parent reply other threads:[~2025-05-07 13:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-28 19:05 syzbot
2025-04-29 2:38 ` Edward Adam Davis
2025-04-29 2:55 ` syzbot
2025-04-29 8:40 ` Edward Adam Davis
2025-04-29 9:01 ` syzbot
2025-04-29 10:23 ` Edward Adam Davis
2025-04-29 10:32 ` syzbot
2025-04-29 10:58 ` Edward Adam Davis
2025-04-29 11:19 ` syzbot
2025-04-30 10:13 ` Edward Adam Davis
2025-04-30 10:34 ` syzbot
2025-05-07 11:30 ` Edward Adam Davis
2025-05-07 11:46 ` syzbot
2025-05-07 13:23 ` Edward Adam Davis [this message]
2025-05-07 13:44 ` syzbot
2025-05-09 18:35 ` Kees Cook
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_E9E91EEE86CD84787A6EF82C196CD494640A@qq.com \
--to=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+4bcdddd48bb6f0be0da1@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®