From patchwork Wed May 27 07:39:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajkumar Manoharan X-Patchwork-Id: 1298680 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20170209 header.b=ATX+tK9U; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.a=rsa-sha256 header.s=smtp header.b=C5E9cKcK; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49X2mc5BG0z9sSW for ; Wed, 27 May 2020 17:40:16 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=y0dvTNOzRkcBJVShc7URY5upm+cfqOu6ErweIKsyzsU=; b=ATX+tK9UNiJlZxPvPN3zlAeSvw hYjdk0JJWNtGY1DS64UfrEksZB3DMV3HzDmtrALHOlHWyXqifD++sb5JDUw2sMh4MSwOTQO2Z6Y8s +K2JB/XC1o+LDmHmbokiZ+tZAxxH3wtlhXcub0BJdKpIQNgqL6keGeiYAa6fw9kQsk/3IobgVh3yQ yv+nOWDTC9YxuOoXWJO+/FlG6frmxWS2jPiWO+tby/MuQvzEZap+c8snHhBfZWX5SDIOi0xcD0Z/W p7B3B7NvrWrF1HvmJE+Jehtf2XpOzxB6RSMoTuhoKLo1aJQEoTJwVI4AdbaawWxx9QpoLnLmpFaHd r5jxhjXA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jdqfK-0004Aw-9X; Wed, 27 May 2020 07:39:54 +0000 Received: from mail27.static.mailgun.info ([104.130.122.27]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jdqfE-00045m-FB for hostap@lists.infradead.org; Wed, 27 May 2020 07:39:49 +0000 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1590565188; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=sZxa0MdTFzGNmEUz1hALz9V6RDjyrpKaE0a4GNOWhwg=; b=C5E9cKcKDdqL0zFfbKIOMqe0Olic/iEDWnL3XTESGXWc6VQkrhpea3UMdf/Eq1bGT25qQSIR LVIqEVv8YtyI3x/ln8XWajCvPhjYLHWgmmJLQyDKTQTv7ROL1bAH36w5xqrbirc00m3YokIn BnIUAK8KYO1b4h+xBvOBiDJybRQ= X-Mailgun-Sending-Ip: 104.130.122.27 X-Mailgun-Sid: WyJkMjNkOSIsICJob3N0YXBAbGlzdHMuaW5mcmFkZWFkLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n01.prod.us-west-2.postgun.com with SMTP id 5ece1940c6d4683243b16387 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 27 May 2020 07:39:44 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 1209EC433CA; Wed, 27 May 2020 07:39:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from rmanohar-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: rmanohar) by smtp.codeaurora.org (Postfix) with ESMTPSA id 5EFA7C433C6; Wed, 27 May 2020 07:39:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 5EFA7C433C6 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=rmanohar@codeaurora.org From: Rajkumar Manoharan To: j@w1.fi Subject: [PATCH 5/5] AP: Reject association request upon invalid HE capabilities Date: Wed, 27 May 2020 00:39:28 -0700 Message-Id: <1590565168-16379-5-git-send-email-rmanohar@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1590565168-16379-1-git-send-email-rmanohar@codeaurora.org> References: <1590565168-16379-1-git-send-email-rmanohar@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200527_003948_570560_88450536 X-CRM114-Status: GOOD ( 11.23 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [104.130.122.27 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [104.130.122.27 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches 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.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hostap@lists.infradead.org, Rajkumar Manoharan MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org In 6 GHz band mandates valid HE capabilities element in station negotiation. Reject association request upon receiving invalid HE elements. Signed-off-by: Rajkumar Manoharan --- src/ap/ieee802_11.c | 6 ++++++ src/common/ieee802_11_defs.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index c4bf434f2a5b..6b8309586265 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -3183,6 +3183,12 @@ static int check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta, if (resp != WLAN_STATUS_SUCCESS) return resp; if (is_6ghz_op_class(hapd->iconf->op_class)) { + if (!(sta->flags & WLAN_STA_HE)) { + hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211, + HOSTAPD_LEVEL_INFO, "Station does not support " + "mandatory HE PHY - reject association"); + return WLAN_STATUS_ASSOC_DENIED_NO_HE; + } resp = copy_sta_he_6ghz_capab(hapd, sta, elems.he_6ghz_band_cap); if (resp != WLAN_STATUS_SUCCESS) diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h index 22d76dc42182..f240f52acc08 100644 --- a/src/common/ieee802_11_defs.h +++ b/src/common/ieee802_11_defs.h @@ -204,6 +204,7 @@ #define WLAN_STATUS_FILS_AUTHENTICATION_FAILURE 112 #define WLAN_STATUS_UNKNOWN_AUTHENTICATION_SERVER 113 #define WLAN_STATUS_UNKNOWN_PASSWORD_IDENTIFIER 123 +#define WLAN_STATUS_ASSOC_DENIED_NO_HE 124 #define WLAN_STATUS_SAE_HASH_TO_ELEMENT 126 /* Reason codes (IEEE Std 802.11-2016, 9.4.1.7, Table 9-45) */