From patchwork Sun Sep 1 16:31:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1979404 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=RxIuV3V+; 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=kc695sDE; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WxcyF44Vrz1yg9 for ; Mon, 2 Sep 2024 02:38:13 +1000 (AEST) 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=VE2j26g/HD7t4u4x2prVyorKS9gHg7aoP+eIgylk/0M=; b=RxIuV3V+ltmdYa eldL0rcJ64pmNgEWaIbR6UubjzKkGhgnNvxtXL6KmIMq4kEPu7g4SAEi5zUSQ/00WyxntqbI7q1l/ 0c3dP9prJpBN2mRcq0uO70rvbL7rSKx4PtuhkAVX041sa6NvF7bsvfWRX5UQF8pS6+I5EcSfd6eaW oGWQHMcqs6Jrj1DFbva7+FdzRoUe9160bAbTNk/FxILH139ecOtKwbnCM0LR0V3p6Z/O75Hgtzt5J 09Aq7vqqhULEKUbeNroY6AA7U4RPck561CHpIFw0rd4gjZ0Cx7OqJsopu80vvSuret/Co9T8SyusX tRX6L8SJWWdeTxbL1Htw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1skna2-0000000Bxxo-0Woc; Sun, 01 Sep 2024 16:37:34 +0000 Received: from mgamail.intel.com ([192.198.163.10]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sknZy-0000000Bxw4-0zwm for hostap@lists.infradead.org; Sun, 01 Sep 2024 16:37:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725208650; x=1756744650; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=twzDdvPVbgBJaa04YF65OAYOSsq9q/+B3IEMKWyNPhY=; b=kc695sDE3IQBVku4v9soDyaRSLl/YbX9xdw4mgWRjYOlUGH+LQASoqjD i+5zamkXZIS8gQyssfF8rGs/VAM5W9VRIYvn0AyESebTlrqdKv0GhGwZ/ VJWSP4fcgvGFf91XnuJV6Sh9BitgCsgufBNyw73RFoEMvEwWsLUcpJ55T mWxDR6rRcu2J7pg0YuVPJXCMDukn6oXZf2whWP2UX2xPdzVcjRmINtVg5 3WalxMn9FU1QMRwNS4+pRu7ns//Zk9rGI2ybgon++IOYSOMeKSfOdL+mw jjmaWqTha+OIDp685g5Zscn2Bb+y4EZYqWuIM8643DNoI1DpD0gmZ8leh Q==; X-CSE-ConnectionGUID: i40xWInqTFqbt005D3NkAw== X-CSE-MsgGUID: 74enfs78RxaSWlNDEXeG3A== X-IronPort-AV: E=McAfee;i="6700,10204,11182"; a="35193451" X-IronPort-AV: E=Sophos;i="6.10,194,1719903600"; d="scan'208";a="35193451" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2024 09:37:26 -0700 X-CSE-ConnectionGUID: MKsH6Q7dTmqW22W1MJ+BNg== X-CSE-MsgGUID: A2N0ZVVyQ+22cYnK1lbN9g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,194,1719903600"; d="scan'208";a="101844825" Received: from weis0042.iil.intel.com ([10.12.217.211]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2024 09:37:25 -0700 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Benjamin Berg Subject: [PATCH] BSS: MLD: Parse all TBTT entries after an invalid link Date: Sun, 1 Sep 2024 19:31:34 +0300 Message-ID: <20240901163135.2141665-2-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240901_093730_361696_7BFDFC8B X-CRM114-Status: GOOD ( 11.24 ) X-Spam-Score: -4.5 (----) 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: Benjamin Berg We would incorrectly exit the loop that iterates all TBTT entries if an entry is found with an invalid link ID. This commonly happens if the AP reports a link for another AP (or just another AP in the [...] Content analysis details: (-4.5 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [192.198.163.10 listed in bl.score.senderscore.com] 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [192.198.163.10 listed in sa-accredit.habeas.com] 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [192.198.163.10 listed in sa-trusted.bondedsender.org] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.198.163.10 listed in list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from 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_AU Message has a valid DKIM or DK signature from author's domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 T_SCC_BODY_TEXT_LINE No description available. -0.1 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Benjamin Berg We would incorrectly exit the loop that iterates all TBTT entries if an entry is found with an invalid link ID. This commonly happens if the AP reports a link for another AP (or just another AP in the same MBSSID set). Change it to continue with the next TBTT entry so that all entries are parsed and all links can be found. Fixes: de5e01010cb2 ("wpa_supplicant: Support ML probe request") Signed-off-by: Benjamin Berg --- wpa_supplicant/bss.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c index ec23ffad3e..102191f1a4 100644 --- a/wpa_supplicant/bss.c +++ b/wpa_supplicant/bss.c @@ -1588,7 +1588,7 @@ wpa_bss_parse_ml_rnr_ap_info(struct wpa_supplicant *wpa_s, end = pos + len; pos += sizeof(*ap_info); - for (i = 0; i < count; i++) { + for (i = 0; i < count; i++, pos += ap_info->tbtt_info_len) { u8 bss_params; if (end - pos < ap_info->tbtt_info_len) @@ -1599,7 +1599,7 @@ wpa_bss_parse_ml_rnr_ap_info(struct wpa_supplicant *wpa_s, link_id = *(mld_params + 1) & EHT_ML_LINK_ID_MSK; if (link_id >= MAX_NUM_MLD_LINKS) - return; + continue; if (*mld_params != mbssid_idx) { wpa_printf(MSG_DEBUG, @@ -1637,8 +1637,6 @@ wpa_bss_parse_ml_rnr_ap_info(struct wpa_supplicant *wpa_s, RNR_TBTT_INFO_MLD_PARAM2_LINK_DISABLED; } } - - pos += ap_info->tbtt_info_len; } }