mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 19:30:32 +0800	[thread overview]
Message-ID: <tencent_06AC9518E9DAEE02CC847A366C002D4D6C0A@qq.com> (raw)
In-Reply-To: <680fd171.050a0220.2b69d1.045e.GAE@google.com>

#syz test

diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 741e6c7edcb7..6842c3011a99 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -1353,6 +1353,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
 	hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_MONITOR);
 	hw->wiphy->software_iftypes |= BIT(NL80211_IFTYPE_MONITOR);
 
+	if (!channels)
+		return -EINVAL;
 
 	local->int_scan_req = kzalloc(sizeof(*local->int_scan_req) +
 				      sizeof(void *) * channels, GFP_KERNEL);


  parent reply	other threads:[~2025-05-07 11:39 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 [this message]
2025-05-07 11:46   ` syzbot
2025-05-07 13:23 ` Edward Adam Davis
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_06AC9518E9DAEE02CC847A366C002D4D6C0A@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®