Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp2126702pxu; Sat, 17 Oct 2020 12:28:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjaZDM7c2mnP7TgXlFbpJjySyDCRXD5/Jbiqi/5OaxH6a+p1etXImBm0eZ6if2rvIUkZrR X-Received: by 2002:a17:906:f110:: with SMTP id gv16mr10050271ejb.257.1602962888670; Sat, 17 Oct 2020 12:28:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602962888; cv=none; d=google.com; s=arc-20160816; b=n09fx7HaI4Nrkz4nkOOLukbuLwxjsVzMlibcImXyXfDBF0P2aqoEA9fXY8uD0qDQY9 icVTX/qa9m+F2AZNXF7aD5Ffur9psqhm2u8z/oWWq4yPWZA5mVBG1k/jBQa0mE38Lql5 +xHuktK6a5AvWO9tahlX+qIzss5eU/ofy5gEvfKcd8iNl5kHsnFMTmMbYeFtF2Vdhn1/ HJOLWlAU0G9wZZ7Ro8wku0xu1PouK7+7lDLgvdxz3mczegReTpykZVtAV9Y9x8fXGX/T 9bFctD/mV8N1ajFDtCPonmwlqbnVq3z+sxBweQ3z84ZgD0zy3PMbErJMOPmqroHP79zU 9YpQ== 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:subject:cc:to:from:date; bh=CCbNVBVGgTFVDzcwtv4bnMxKbRGSFyuIkbZ5waPWKdU=; b=IQgGV0IDYDBqQPxbWXoBeOXXSxQB+GM92KoR1I4Ag0AW7A7COxRZ9f4wWWH0gk3mHL rsHZw00fUraByrDgPJXRbkn2NlLb22z2QyyWWTm2MgfrQP5+jHrXjrr73POeorEG2Ya/ +RjXg9EtliC4D8gC+UZ6hwBI7PIz1PsDoeZdvBPHjKjoPjnAX9TBrYZgWS4j5CXRlRjM zbS/wMvdsoh+nUkKNbG8QssCa7O6lhxdWyfaDCD2RJzNbTBWYelmR4NUsxu8DnRa/1XC RMKQQS//JhnG5SOaltH/dAZ6QrLya6P/6Z1EapG5VWQXGyowyrGw5Cjp4AeeSx6KLTQJ bl7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n3si4225544ejd.44.2020.10.17.12.27.21; Sat, 17 Oct 2020 12:28:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438124AbgJQTI3 (ORCPT + 99 others); Sat, 17 Oct 2020 15:08:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437462AbgJQTI2 (ORCPT ); Sat, 17 Oct 2020 15:08:28 -0400 Received: from rhcavuit03.kulnet.kuleuven.be (rhcavuit03.kulnet.kuleuven.be [IPv6:2a02:2c40:0:c0::25:136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB15BC0613CE for ; Sat, 17 Oct 2020 12:08:27 -0700 (PDT) X-KULeuven-Envelope-From: mathy.vanhoef@kuleuven.be X-Spam-Status: not spam, SpamAssassin (cached, score=-51, required 5, autolearn=disabled, ALL_TRUSTED -1.00, LOCAL_SMTPS -50.00) X-KULeuven-Scanned: Found to be clean X-KULeuven-ID: 2B6C2120330.AEA6A X-KULeuven-Information: Katholieke Universiteit Leuven Received: from icts-p-smtps-1.cc.kuleuven.be (icts-p-smtps-1e.kulnet.kuleuven.be [134.58.240.33]) by rhcavuit03.kulnet.kuleuven.be (Postfix) with ESMTP id 2B6C2120330 for ; Sat, 17 Oct 2020 21:08:23 +0200 (CEST) Received: from mathy-work.localhost (unknown [31.215.199.82]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by icts-p-smtps-1.cc.kuleuven.be (Postfix) with ESMTPSA id 6924140B2; Sat, 17 Oct 2020 21:08:21 +0200 (CEST) Date: Sat, 17 Oct 2020 23:08:18 +0400 X-Kuleuven: This mail passed the K.U.Leuven mailcluster From: Mathy Vanhoef To: Thomas Deutschmann Cc: , "davem@davemloft.net" , , , netdev , "linux-kernel@vger.kernel.org" , Subject: Re: [Regression 5.9][Bisected 1df2bdba528b] Wifi GTK rekeying fails: Sending of EAPol packages broken Message-ID: <20201017230818.04896494@mathy-work.localhost> In-Reply-To: <4a7f92dc-13bb-697f-1730-ac288e74b730@gentoo.org> References: <4a7f92dc-13bb-697f-1730-ac288e74b730@gentoo.org> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org I've managed to reproduce the issue, or at least a related issue. Can you try the draft patch below and see if that fixes it? [PATCH] mac80211: fix regression where EAPOL frames were sent in plaintext When sending EAPOL frames via NL80211 they are treated as injected frames in mac80211. Due to commit 1df2bdba528b ("mac80211: never drop injected frames even if normally not allowed") these injected frames were not assigned a sta context in the function ieee80211_tx_dequeue, causing certain wireless network cards to always send EAPOL frames in plaintext. This may cause compatibility issues with some clients or APs, which for instance can cause the group key handshake to fail and in turn would cause the station to get disconnected. This commit fixes this regression by assigning a sta context in ieee80211_tx_dequeue to injected frames as well. Note that sending EAPOL frames in plaintext is not a security issue since they contain their own encryption and authentication protection. Fixes: 1df2bdba528b ("mac80211: never drop injected frames even if normally not allowed") --- net/mac80211/tx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 8ba10a48d..55b41167a 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -3619,13 +3619,14 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw, tx.skb = skb; tx.sdata = vif_to_sdata(info->control.vif); - if (txq->sta && !(info->flags & IEEE80211_TX_CTL_INJECTED)) { + if (txq->sta) { tx.sta = container_of(txq->sta, struct sta_info, sta); /* * Drop unicast frames to unauthorised stations unless they are - * EAPOL frames from the local station. + * injected frames or EAPOL frames from the local station. */ - if (unlikely(ieee80211_is_data(hdr->frame_control) && + if (unlikely(!(info->flags & IEEE80211_TX_CTL_INJECTED) && + 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) && -- 2.28.0