From patchwork Wed Apr 1 16:17:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 228518 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7453FC2D0F0 for ; Wed, 1 Apr 2020 16:22:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 19F2F20857 for ; Wed, 1 Apr 2020 16:22:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585758130; bh=teEkTjfnD/nvwev9QxvZ6FJfT9iFlPUNMj6FlN/koZg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=1zB71fIzP/7BmpPD/PhB3DzbPZT3OYpUoMy9VPJzI7IsjjVVe62IjKCqnaUFBb06/ ObkVY1zUoxmDGOgj6MG7jOSezYrZnZF0/c3kJymdbepUD07zYI0SW+Cx8YvokUv3m+ xfjYZIerD5yUlPd2x9EkfhSSBh2HXqFAPTXSGHQs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733044AbgDAQWJ (ORCPT ); Wed, 1 Apr 2020 12:22:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:45098 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387435AbgDAQWG (ORCPT ); Wed, 1 Apr 2020 12:22:06 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4FA3020857; Wed, 1 Apr 2020 16:22:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585758125; bh=teEkTjfnD/nvwev9QxvZ6FJfT9iFlPUNMj6FlN/koZg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zoGIS5GoeLiMhFgIhlDbrbW+wanD6fEQMg+jJb460CH/x1ggRxryUsgeREIa9CNzA NzX3J62QSiMb4E4AHPXfjRx+RjC92bka6r/SLLL6BUkyDlR/MIciD9eW2U9YSF9sNw DaXptsLeAZXQhRrOWgA6tVc2rP1oTGTky22W25t8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johannes Berg , "David S. Miller" , Woody Suwalski Subject: [PATCH 5.4 02/27] mac80211: fix authentication with iwlwifi/mvm Date: Wed, 1 Apr 2020 18:17:30 +0200 Message-Id: <20200401161417.064523514@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200401161414.352722470@linuxfoundation.org> References: <20200401161414.352722470@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Johannes Berg commit be8c827f50a0bcd56361b31ada11dc0a3c2fd240 upstream. The original patch didn't copy the ieee80211_is_data() condition because on most drivers the management frames don't go through this path. However, they do on iwlwifi/mvm, so we do need to keep the condition here. Cc: stable@vger.kernel.org Fixes: ce2e1ca70307 ("mac80211: Check port authorization in the ieee80211_tx_dequeue() case") Signed-off-by: Johannes Berg Signed-off-by: David S. Miller Cc: Woody Suwalski Signed-off-by: Greg Kroah-Hartman --- net/mac80211/tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -3602,7 +3602,8 @@ begin: * Drop unicast frames to unauthorised stations unless they are * EAPOL frames from the local station. */ - if (unlikely(!ieee80211_vif_is_mesh(&tx.sdata->vif) && + if (unlikely(ieee80211_is_data(hdr->frame_control) && + !ieee80211_vif_is_mesh(&tx.sdata->vif) && tx.sdata->vif.type != NL80211_IFTYPE_OCB && !is_multicast_ether_addr(hdr->addr1) && !test_sta_flag(tx.sta, WLAN_STA_AUTHORIZED) &&