Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp509823imw; Wed, 13 Jul 2022 02:50:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vpBV7b3SMBogsyfW5EINaDO+3RSy8R9OpN4tLdAvqFvvmOmZYNW7V/nHZ1t7LQYyxuFcH5 X-Received: by 2002:a63:87:0:b0:40c:b1f6:a879 with SMTP id 129-20020a630087000000b0040cb1f6a879mr2262269pga.236.1657705723230; Wed, 13 Jul 2022 02:48:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657705723; cv=none; d=google.com; s=arc-20160816; b=GaBnkT8ydhR4tJkY22sI2V0buZhd9mpL/xs+PWftSR/vKCiW0IextyumO2GXzbuk4I wOXJDgXp+DbXH5Nxhya5T2YXZ8KV/5cU4lYjvv191K05YUyrB0a0b4daeihAFIzveaEC tBc6wYhElrTauVVVFZpPZJOIYpaIU0VwUnyyBIrHEPycCXTJqxppTFamDDsxIDb+9yvS f4+ebPzScPal+oms8SOv1qy66cWs3lPTDagxwJKw82a+QBa5VGZwyZWpNdWUS4WpqrZ2 i30aJ5B3tHRAb/iiiR7r4EtKB3WhhRrN/xwdOrwR+48ba7kLqdUv0Knz0C0t6em618rK 8NSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UsWdLTowwZ7OBU9n/A/NHQawzMdN3volBhQj58kiJ/s=; b=VG9GbEwzfp37qpJxXjMN9diaFdmXbqO7d1hV9Io2ICzujfFOcR202PlTzvk913Kg+p ihBitDFsJaEAPb4jPoLi5E+6Ud3U9dGIP3F4q7ZE5Uam4opKmsdez6lQgkaaGCHw8dw9 lSMbgW5y6cPfIAyJtqHZX+o/D1A6MWPSdRmLZIUrLeK9zTBhNDD+kCRrSaugHpOl3Xzx RUFx99fBDS+vvfKUpu/9CF0GGro4LJxssDRwXbx4Ooq4sJmDWVpCinXyS/WWEPcpPw5y EaWvseoHG1T3GhYmHXiMwNUAqhcbGusCcpOvc/PrA+ioJUdGlZhVe62/y0Qnweb9fhcX 5PhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=B0gIzFRX; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x30-20020a637c1e000000b0040da3e73d46si16896007pgc.139.2022.07.13.02.48.35; Wed, 13 Jul 2022 02:48:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=B0gIzFRX; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234879AbiGMJqt (ORCPT + 65 others); Wed, 13 Jul 2022 05:46:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236260AbiGMJpi (ORCPT ); Wed, 13 Jul 2022 05:45:38 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FAEBF6B82 for ; Wed, 13 Jul 2022 02:45:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=UsWdLTowwZ7OBU9n/A/NHQawzMdN3volBhQj58kiJ/s=; t=1657705529; x=1658915129; b=B0gIzFRXzlEBxKlwLWTCxFMgiOZ7EBQmQBdBUucelrRvaUs pwA51SxcsAdrQC9wtgWDMYgmRsTecuaZyJEB4H6WPqNwv4Cxtz1N9xQZLJvDLLAOqEDuYUw+ZOHNt mroOJrsfPJeGn6+ICf3VqHAmof6aiQYGar42YJUDBC5HCJLb4RPOEV4FRk8FlRBkCTLQ36ojzBZSu AxupGaj4yx+VGpGZ0y0e7W/QmG2Rlc1kOTszQAeGiJ+a5OpZyMnwpiuXmfJfZnZS8ECSqsLTY7TQI c2rzm2hqrSm6OiEM83sVgce4UTupFFszLveZDFWDI7FPXZFykJYpmong9H9NHfyA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1oBYvv-00EgvB-Ah; Wed, 13 Jul 2022 11:45:27 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 65/76] wifi: nl80211: check MLO support in authenticate Date: Wed, 13 Jul 2022 11:44:51 +0200 Message-Id: <20220713114426.1969ed1b1e54.I9a4d1235561ff868742abeed69a2f558040607e5@changeid> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220713094502.163926-1-johannes@sipsolutions.net> References: <20220713094502.163926-1-johannes@sipsolutions.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg We should check that MLO connections are supported before attempting to authenticate with MLO parameters, check that. Fixes: d648c23024bd ("wifi: nl80211: support MLO in auth/assoc") Signed-off-by: Johannes Berg --- net/wireless/nl80211.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index b75398f0d5b4..ee3826e8e52b 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -10410,6 +10410,8 @@ static int nl80211_authenticate(struct sk_buff *skb, struct genl_info *info) req.key_idx = key.idx; req.link_id = nl80211_link_id_or_invalid(info->attrs); if (req.link_id >= 0) { + if (!(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_MLO)) + return -EINVAL; if (!info->attrs[NL80211_ATTR_MLD_ADDR]) return -EINVAL; req.ap_mld_addr = nla_data(info->attrs[NL80211_ATTR_MLD_ADDR]); -- 2.36.1