From patchwork Mon Apr 8 13:06:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1920837 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=X7v5Iapf; 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=NMiM4llB; 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 4VCqCz6CNlz1yY8 for ; Mon, 8 Apr 2024 23:08:47 +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:References:In-Reply-To: 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: List-Owner; bh=R50tDpJDGOG0mtsDjojZgnJmdOm7rA03iKW25+cowOo=; b=X7v5Iapfjo0hNb gxCZUhbIA7tFLgcNa8OltM7f7tnOiaUse6SBQBclHpGwK5hLJ2L0hE8S3GUnU2Qj04jY4LtTooI91 +5yUepl91K5dr6Th0H+rZos20m8KvRp4fz09KXaDfVgQo9GlUEsnB+mOB9/PLySoEFYdFLsqpdeO0 DFRoebO5Cfi+H/Yjk7DkZla9v0igjLcww4P92zyZT0YKM0T6oDDClLVnv+mk8e5BjSqTbQWfVvE9W 8pU9TC6OC5XGAqE87i7TE1BYCXFEvjj0WJQPsbgPIAD4ppyf5To9rQfe9Y7dzucYswW3fdBUYMs5z IsluCIqX2Nta7yGqYQRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtoja-0000000Fdu7-2ULh; Mon, 08 Apr 2024 13:08:27 +0000 Received: from mgamail.intel.com ([198.175.65.14]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtojV-0000000FdsZ-1X0C for hostap@lists.infradead.org; Mon, 08 Apr 2024 13:08:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712581701; x=1744117701; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qePUcdZdEVcL7FBzjdm7KIeEMWQsEIRqdSXSD+ci80A=; b=NMiM4llBnPZYzDlcYYJ9frYFORRCXPeZsfEfHnGE27Pix7x+OShJp33B lTceP6IitYOxeRHfbiJMnSKsaT0HN60Gn78i3mtgjAIBxSiJ+9bUZviyK N15Vl+WC21joEzBwF/BOBh5UyhccSwHI6P9qUK1fc2fVz31h/Z/kKdhTr ix+4Jsv5I3tUPZB2HMMtsT8hNIgvAxy1wjcKfFWQYGtN1AXYeKGhUFy+8 ek2ipL67BpOQKhb1Pqcrzso7iNCVQt/zOOMQ2uIAK+ZpCUx4yzTCQSf73 zpOi/UM/RCo7Z6zUdQ2hPso9a+DlxUgFgACP7Jj9pWYhXgwIj5HWYEKAM Q==; X-CSE-ConnectionGUID: CH0Vz7PZRGeczKxpj8GJQg== X-CSE-MsgGUID: OCFANPYrRAGJvqR9DR8axg== X-IronPort-AV: E=McAfee;i="6600,9927,11038"; a="11688871" X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="11688871" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 06:08:21 -0700 X-CSE-ConnectionGUID: rTiiHeBYS2C2n8jMn600XA== X-CSE-MsgGUID: lGP38LINRdqqLRD+R9B2Cw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="50868781" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 06:08:20 -0700 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Ilan Peer Subject: [PATCH 3/7] SME: MLD: Deauthenticate when failing to parse ML element Date: Mon, 8 Apr 2024 16:06:57 +0300 Message-ID: <20240408130701.531194-3-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240408130701.531194-1-andrei.otcheretianski@intel.com> References: <20240408130701.531194-1-andrei.otcheretianski@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240408_060821_535408_8434CFF8 X-CRM114-Status: UNSURE ( 8.45 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.4 (--) 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: Ilan Peer If parsing the basic ML element in the authenticate frame is failed, instead of only disassociating, completely deauthenticate so all state machines would be in a consistent state. Content analysis details: (-2.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [198.175.65.14 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_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -1.5 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: Ilan Peer If parsing the basic ML element in the authenticate frame is failed, instead of only disassociating, completely deauthenticate so all state machines would be in a consistent state. Signed-off-by: Ilan Peer --- wpa_supplicant/sme.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c index f08184f981..0115caf8c5 100644 --- a/wpa_supplicant/sme.c +++ b/wpa_supplicant/sme.c @@ -2156,7 +2156,8 @@ void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data) MAC2STR(wpa_s->pending_bssid), WLAN_REASON_DEAUTH_LEAVING); wpas_connection_failed(wpa_s, wpa_s->pending_bssid, NULL); - wpa_supplicant_mark_disassoc(wpa_s); + wpa_supplicant_deauthenticate(wpa_s, + WLAN_REASON_DEAUTH_LEAVING); return; }