Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp543998lqh; Thu, 28 Mar 2024 09:05:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXJez8/Hj3VNcrDB3Qk9Ja6ACh9gIb+X92TjCXnDKUEOK3GBL2QfAWh26PVjdzwXcISbIDFH2T3EyN8YiWTdqnqefET0jq+WUq7Wwp+uw== X-Google-Smtp-Source: AGHT+IFp3YXb4HRxJpjIVJDqPc7uKyPr+Lzs5hIKtkr4k6MSYKgntbpFbNitOXgnM8ER2pnRiGQE X-Received: by 2002:a05:6a21:4005:b0:1a3:63fa:d0e6 with SMTP id wa5-20020a056a21400500b001a363fad0e6mr3085404pzb.57.1711641933568; Thu, 28 Mar 2024 09:05:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711641933; cv=pass; d=google.com; s=arc-20160816; b=je3nxwZxsxPoLR112SyGy3ax8NHKgElpjy99vsKivTGrvWTvhvDNCe3cYajFIfsesp qTUz3u7t3ltumfb9gaidAYBeR0g6C7qlWhpv7zzZeZNHZC031mEQPLH3Td5WuxmaP0rl oz+Kv44Ou7LzqLiLnhR5tBfZ2MK3gz8YsYcJPRcXeSuDwKE8Kmx9Lv2NK9OBhPOd3zEV Hn3+Mu68ZPgSw/VMnF80p2hX2KfLhXmAd1wIyAwS12pY40UdaV8uAoMe+kNtHCIaLnAe nF4W78u4yPCIAk1LaaawTodYD4Xe1iOWzrMJIhq/giKH602C89QpAGyXA9tddOgQK2Ag kACQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:to :from:subject:message-id:dkim-signature; bh=+vM1QUNxQli4H70pnNlFpgkwDkoexBt/DTkoyaoyTLk=; fh=3FpYYAvUluKs/QpWY7Yh47EKd+Dg7xJcoKFphn3EMjM=; b=wDDFsceZUerZ2q6WPT+GBayhTJEoqAjw5DKqKL7I1Z0wYSKVup5HJOQP9J2EPa+EvU WUtvVxY1ajyOMuYsGqSOQi8h1mb1HI+IGfZMkPLJGAbr5KEv80Mt/D2tUtiSC9iJbi5f bwFjUoVIyhxjpFJv4DLUGkBjIfRjV9wwd9iz957pdHQuaWpgDLoVhqDHWqz+36e59HiX WfeH6N45sklmvF4qwzgpTiXhdGZyaZGh9xN+isHKtKbokFfKuxlG0kkqlGY388XCfq8C BtlwG2Dr0PWUtxoJhGUqGcZYpKA2a3VtrQeflxQlic8tzInQwNoECvQxsdSsnUe6gvdo OiwA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b="rvLPM5/2"; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-5470-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5470-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id o1-20020a056a001b4100b006e546bd270dsi1694282pfv.364.2024.03.28.09.05.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 09:05:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-5470-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b="rvLPM5/2"; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-5470-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5470-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3F48E2927E8 for ; Thu, 28 Mar 2024 16:05:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6BAC581AC8; Thu, 28 Mar 2024 16:05:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="rvLPM5/2" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D5E38004E for ; Thu, 28 Mar 2024 16:05:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711641931; cv=none; b=FWxWASYkW1iFdZu0VE/8BOSqF5vQx4odrF9yrMF3QXBwAJLierlrWUqdkb7iEBOAIQl/8MWBEfYYYr/hE19Lv7/yM1KIF2aAX9RoVlF3k/o1wkbOCtf7YRbvUfzibEwJrNyT8jWlQHBQADebKC7PUeirFJLFtupxP7FGJJ5VnIY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711641931; c=relaxed/simple; bh=+vM1QUNxQli4H70pnNlFpgkwDkoexBt/DTkoyaoyTLk=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References: Content-Type:MIME-Version; b=NDha5QfliKLi4JQg7O+D2ic3+rcqSzpRNS8gqcuuA8H6NjCFOV8UKIKRRUZjoF9aoGr4tLH4cDpmMpRQsQkfeTJqg8lfYdygW0U6MFxvoTeJPmcqSHCvPPXw9TJiwF+oovPrqgOMC7VTM2SFdJ9czOh4Rt1cMpgiCuc1iPB/xgE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=rvLPM5/2; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:To:From:Subject:Message-ID:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=+vM1QUNxQli4H70pnNlFpgkwDkoexBt/DTkoyaoyTLk=; t=1711641929; x=1712851529; b=rvLPM5/2WSsu/acy8dwjdvxAFH3e/o3zrtJSkSS+tmwbDec IU3JZYeCWsadDAPNraHzRe8gqswkKm77K1GE17qL71M+h9IXJWNTkPoX31HVrcwhMG4lnDT/yoNYT ocerIyzy8SJXteket1OMlI3rmqTkKeqWNJqbQ0DawDgExJQ3mCQjdtk0U0ozvqUq06vAxsqhc2jQ/ PWN4/lQGzovQtqz1kITGf2jwgs3fCHlaWTCx3hiTHvWUL9CDpLZW2GrkPM3J1a7HMhBSsB3ihQJl0 AOBDSWNKuXfkYPHA6DDZW/V5OdATNOSrvQyhX072UG88Cr3jXZOQkaVpWBN0k1xA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rpsFn-0000000179m-3tJ7; Thu, 28 Mar 2024 17:05:24 +0100 Message-ID: <968024261cf1d4e72832451e1c4cc64922d05364.camel@sipsolutions.net> Subject: Re: No way to cancel SAE after CMD_AUTHENTICATE? From: Johannes Berg To: James Prestwood , "open list:MEDIATEK MT76 WIRELESS LAN DRIVER" Date: Thu, 28 Mar 2024 17:05:23 +0100 In-Reply-To: <055b857a-83f0-4abb-b6ff-f0eaaf572e64@gmail.com> References: <055b857a-83f0-4abb-b6ff-f0eaaf572e64@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-malware-bazaar: not-scanned On Thu, 2024-03-28 at 08:23 -0700, James Prestwood wrote: > Hi, >=20 > I noticed some odd behavior where userspace is unable to cancel an SAE= =20 > connection until associated. If you issue a CMD_AUTHENTICATE then=20 > immediately (or prior to association) send a CMD_DISCONNECT the kernel= =20 > will not cancel the authentication and afaict ignore the CMD_DISCONNECT.= =20 > The kernel will continue to send authenticate events, and even retry=20 > authentication until the retry limit after CMD_DISCONNECT is issued. >=20 > I see the checks in cfg80211_disconnect which seem to back up this=20 > behavior where its essentially ignored if not "connected". I'm not sure= =20 > where to actually fix this since the auth retries are internal to=20 > mac80211. Since the device isn't even authenticated I'm unsure what=20 > value/structure to even check in order to detect this situation and=20 > clean up. But there needs to be some way to cancel the authentication,= =20 > right? NL80211_CMD_DEAUTHENTICATE should do that? I'm not really surprised you cannot disconnet when you're not even connected yet, for the most part the kernel doesn't care about tracking auth state (any more, for many years now). johannes