Message ID | 20230223122306.14037-1-andrei.otcheretianski@intel.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=J+/1PU/E; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=UMKwQFCX; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PMsfd6PCfz2461 for <incoming@patchwork.ozlabs.org>; Thu, 23 Feb 2023 23:24:57 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=3jfUWQ9ngrxC9HAeHjlyqIDzB5goQaxBflAmASddzXE=; b=J+/1PU/ET/eQZU S04O4HaWCsky74qDjWGj1vrJXxLHTgz4HeV3vfjotnFU5FIFRpwWaudK1pfkXpKaCduvoe9VJiACV RkZZ+PHhXNbyjkz2JPRfPSI2nczYH8wLiEX+VaZlqzrF5X8EBzg8P8WYLTCh8WDAxfKZfyHyt390p P3XOgeIlUjHKc9uFdivIwE7hZP7c2/4QmFncC7w29xueAiVRN+yaPJgsjlLtWjEuLOG7Zav5xz7pN 6WkGmxDJeUmeXKNW6qfPx3aG3MJfvHQXtnIXY4JLXiWojmcMFJJNE5u8cQwcD9NzYyL6h2YGn4xst PjZCW4Kag9V1zjA6lSnQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pVAdN-00GHqQ-96; Thu, 23 Feb 2023 12:23:37 +0000 Received: from mga11.intel.com ([192.55.52.93]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pVAdK-00GHpy-9g for hostap@lists.infradead.org; Thu, 23 Feb 2023 12:23:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677155014; x=1708691014; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=NrpZzO0ZkQAv9pVxx4gvNaXH5U+1PUrOXiQ5IPICE9s=; b=UMKwQFCXvdPC0FQjkahRQD+GYng3WXdnTTy4R2yZi7xhW1MFsy6vkIJi 7YYG87Mn/Ydvki/z8C7k3RY32wnZNUiV3+yyuAGPXUl0tcFKBTWrJN6Nr cbKCaH/l+WWkyZT9lxo+tqp8E1eyDUxee1JcDIAZ4mbdU/5c9s+KRyE1w 2va/L3GgMn1HEG+dBiKf5ptftJNxp/qBmmc1Y5uE/dS2sWkij25m/likh +p2OxxCDm7h6DwXTCmC4Btg+QTxjGKtD6G5z6wLuW31eV8Xd1DL6VRet0 JHxdSIqd0CAi1V5kMSHBrv6obRXFG0Ks4NR1eEji4XqGdH6xKYiiGTrwA g==; X-IronPort-AV: E=McAfee;i="6500,9779,10629"; a="330925122" X-IronPort-AV: E=Sophos;i="5.97,320,1669104000"; d="scan'208";a="330925122" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2023 04:23:33 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10629"; a="622319810" X-IronPort-AV: E=Sophos;i="5.97,320,1669104000"; d="scan'208";a="622319810" Received: from aotchere-desk.jer.intel.com ([10.13.17.53]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2023 04:23:31 -0800 From: Andrei Otcheretianski <andrei.otcheretianski@intel.com> To: hostap@lists.infradead.org Cc: Avraham Stern <avraham.stern@intel.com> Subject: [PATCH] nl80211: Fix frequencies array boundary check Date: Thu, 23 Feb 2023 14:23:06 +0200 Message-Id: <20230223122306.14037-1-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230223_042334_391089_B8B2E7DC X-CRM114-Status: GOOD ( 12.48 ) X-Spam-Score: -2.7 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Avraham Stern <avraham.stern@intel.com> The number of frequencies is increased before the boundary check, thus it should be allowed to be equal to the number of elements in the array. Signed-off-by: Avraham Stern <avraham.stern@intel.com> --- src/drivers/driver_nl80211_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Content analysis details: (-2.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.93 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <hostap.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/hostap>, <mailto:hostap-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/hostap/> List-Post: <mailto:hostap@lists.infradead.org> List-Help: <mailto:hostap-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/hostap>, <mailto:hostap-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Hostap" <hostap-bounces@lists.infradead.org> Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
nl80211: Fix frequencies array boundary check
|
expand
|
diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c index e3fcb44022..412611dfe2 100644 --- a/src/drivers/driver_nl80211_event.c +++ b/src/drivers/driver_nl80211_event.c @@ -1732,7 +1732,7 @@ static void send_scan_event(struct wpa_driver_nl80211_data *drv, int aborted, if (!os_snprintf_error(end - pos, res)) pos += res; num_freqs++; - if (num_freqs == MAX_REPORT_FREQS - 1) + if (num_freqs == MAX_REPORT_FREQS) break; } info->freqs = freqs;