Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1253758pxb; Fri, 22 Jan 2021 10:38:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAHkHGyAK0TV9fyUrrKs7wquxTUY+zETIOm/Fzp0YAhDoSE5k46EMlIDmOEnBIwxI5fLDA X-Received: by 2002:a17:907:9801:: with SMTP id ji1mr3780605ejc.420.1611340707045; Fri, 22 Jan 2021 10:38:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611340707; cv=none; d=google.com; s=arc-20160816; b=IyIOjngGNGM+/rnmrL5mYalxXUg0L+T5gR/R3xof67OQg39dX3O10Me1gqfamXrFHw MR7nxp2Lw35dId8azI7V2RS+hFaDZWC8W8HapkPLOi3rvRj+3qN05nFMd/+EbTXEGY7r LBdD8Fa0iFa5fF4lxXeBC1TiREImO3dfp0XgRahqbQFFY+OShLcyaiC2GX7wxKoYffV2 Ti/XME9P0eO6SXZNcGuUfqmlGqvX8hEfR5s1Nl/LcvvsDhU0HruJzsGtgl15etqzOseT XpAk6zWP8M6IG1bSdUZkzDABelKCEW+KtYqPsTT4giDGSdaQLR4ZOGLOYtv5F/6qFFeQ vSAg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zmXomfIk1t3EM6TTQpE1fiG6fAee2EEnyetZ47oXYQM=; b=A48xgyF2vJKWQ0WCLD7LRzQM4RvDwP4lwbvOnrpnE47OFmBZtbS9mFt5nlMfg74JnN clXlgoQjsX/Pjv2WE0LoLBJ5Y261QE6gft5ytkmOfsxdEDQ40AB6SljVl89wMEOc70s6 XS9Yf1wScPZdObszbQpUxltkR46Q6h5FJvP1E6hHIZmPR8w9zOHaXriycnrIy1hUHMxL f5CtOHArpDE3hN39/Weq30GbIVwklgik255v/SWlpDy+/pd/V9OekoOyAFP7d2y+LMWf k+TJTWlQAh17iAx9g3rV+vPOFkEtKQ4I+AVn5KNmj4U9BYa1OAF4HEmDaBrO3AqANBLm 7a4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1qoEAsxA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z27si4325736edi.351.2021.01.22.10.38.03; Fri, 22 Jan 2021 10:38:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1qoEAsxA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729944AbhAVSXw (ORCPT + 99 others); Fri, 22 Jan 2021 13:23:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:39306 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728585AbhAVOXQ (ORCPT ); Fri, 22 Jan 2021 09:23:16 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id EF2C023B79; Fri, 22 Jan 2021 14:17:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611325051; bh=ZXBaXyIbiejXVj+zYqIgsppsmpPjA3UTJN3xCaPZB/Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1qoEAsxAFe5WQkv12VlVnwbNItLYfW7iBOpEtDtABHE1oE7xIvedJw09P34vE/t2R tY7qzFWT/FfWhkKmAWRxRXsiyFdAE5rwr12Lll6eKYdVNlM8D+nug+OewnF4/Rwqbz 5AWI/qVVtuNptvTPsBB7vlXfzIA3J4qaQ4jOfqGE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sebastian Gottschall , Felix Fietkau , Johannes Berg Subject: [PATCH 5.4 31/33] mac80211: do not drop tx nulldata packets on encrypted links Date: Fri, 22 Jan 2021 15:12:47 +0100 Message-Id: <20210122135734.824968810@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210122135733.565501039@linuxfoundation.org> References: <20210122135733.565501039@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Felix Fietkau commit 2463ec86cd0338a2c2edbfb0b9d50c52ff76ff43 upstream. ieee80211_tx_h_select_key drops any non-mgmt packets without a key when encryption is used. This is wrong for nulldata packets that can't be encrypted and are sent out for probing clients and indicating 4-address mode. Reported-by: Sebastian Gottschall Fixes: a0761a301746 ("mac80211: drop data frames without key on encrypted links") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20201218191525.1168-1-nbd@nbd.name Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- net/mac80211/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -657,7 +657,7 @@ ieee80211_tx_h_select_key(struct ieee802 if (!skip_hw && tx->key && tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) info->control.hw_key = &tx->key->conf; - } else if (!ieee80211_is_mgmt(hdr->frame_control) && tx->sta && + } else if (ieee80211_is_data_present(hdr->frame_control) && tx->sta && test_sta_flag(tx->sta, WLAN_STA_USES_ENCRYPTION)) { return TX_DROP; }