lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_E9E91EEE86CD84787A6EF82C196CD494640A@qq.com>
Date: Wed,  7 May 2025 21:23:19 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+4bcdddd48bb6f0be0da1@...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_request_ibss_scan

#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 +


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ