From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796384816; b=cbeapL1inIXstrNxQi7IvLDtA/szx9bqJEKJRPIQVxcQPj/62PC6lQUxD1u4U4o4Na+O f+DHlaetlmQUtzdTVTtjWnzgZjMnQnDD88ctTBNrSJgB1xPKXb9qKGaEIqvDpwjw4V9bp PZIxFJIRis0vboiPdcB3lPJBUj2uJfcNYcZJRKEK7+VNnHKgO2EviowMw9HDx0KM2WeZY 22qxtyh37qfSbXCBfxF8rnx7gnvTs6KwPrtxZeYuSR+jECCiF6xII2CNW55q1BW6F5z/c EESxt1qY3lK2WO8maNBpnrisgI9eHO9KyHhKTPBKcLfv1pAwScrAWX1aVayBfaeNFNg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796384816; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=T9b5E94YuwKG3LRwuvtGteoyuE25K0IoI916hykuiFI=; b=x4BeFQVU2E5BfNCX83SU3g1folsfKRl1CL0RUoJ6oTu3hSBxiaJULOtSjdzXodwswR1p BN9ZEsTnyiUBR9sgdRdrqorXZ78aKT1u2R3YMcS+NGP2q1tRPj4yp48xAHUOqHxiD/Hv1 COf+TK6PGEbYwYpulEcQ0u61cFHoSVzb9IlR9o8HsEJqBP4KKz6h76USzP9lRhxzK+PKK m9a998KYq0p2clejVf33a8wz1oK8GUu7OpJ2RHiRT82oP51y2IzSQbFVPLzrw6ult6Y3R 9crcPk+bGgSgOILmSqa/n3PBQVuS5P2I5QrLuE1fcZrOmnELYQC71ota/5VrcGrehhw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=ZhEbeeMv; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4A90606A32C; Fri, 4 Dec 2026 11:46:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=ZhEbeeMv Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F7721F000C2; Fri, 4 Dec 2026 11:46:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796384816; bh=T9b5E94YuwKG3LRwuvtGteoyuE25K0IoI916hykuiFI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ZhEbeeMvpICmgI8FIre9OSv4426/NBQXtmCMhZKueJWd2Lgj4TsaNFrRyACBm4OWG ZGkffN3H/aI6HaO0vLguUcCz6m/ldHaBjFpfKwuRV3z/h5/fvdYvG7fNoCaGJwBaEE 9f87ZDR7lPuUxKJMElLDE1NGazqRHHUeHo4SOCzc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Johannes Berg , Sasha Levin Subject: [PATCH 6.6 0306/1167] wifi: mac80211: fix IEEE80211_TX_CTL_REQ_TX_STATUS mixup Date: Fri, 4 Dec 2026 18:55:33 +0900 Message-ID: <20261204100709.993761767@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Johannes Berg [ Upstream commit e035900ffe9e8978f7c0d7b61811b6b578751697 ] In ieee80211_build_hdr(), IEEE80211_TX_CTL_REQ_TX_STATUS is checked in ctrl_flags, which is wrong - IEEE80211_TX_CTL_REQ_TX_STATUS is in info->flags, so the check is for IEEE80211_TX_CTRL_PORT_CTRL_PROTO instead. This works out OK because the only place setting _that_ at a point before this gets called is in fact ieee80211_tx_control_port() which was intended here. This is actually needed for correctness, if jt were checking info->flags instead, TDLS would fill/leak the status frames created here. However, we can just fix it by using the cookie instead, that'll be set for PREAUTH frames via ieee80211_tx_control_port() as well, and no other frames. Additionally, the code also erroneously set it, but that just caused preauth frames to get it set, since storing the ACK SKB will also set the correct flag. Drop this assignment entirely. Fixes: a7528198add8 ("mac80211: support control port TX status reporting") Link: https://patch.msgid.link/20260803141309.292711-10-johannes@sipsolutions.net Signed-off-by: Johannes Berg [ sashal: Replaced the sk_requests_wifi_status(skb->sk) helper with the open-coded skb->sk && skb_shinfo(skb)->tx_flags & SKBTX_WIFI_STATUS check, since the helper doesn't exist here. ] Signed-off-by: Sasha Levin --- net/mac80211/tx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index f88613c811ac2..9e9b5ad93be18 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -2954,7 +2954,7 @@ static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata, if (unlikely(!multicast && ((skb->sk && skb_shinfo(skb)->tx_flags & SKBTX_WIFI_STATUS) || - ctrl_flags & IEEE80211_TX_CTL_REQ_TX_STATUS))) + cookie))) info_id = ieee80211_store_ack_skb(local, skb, &info_flags, cookie); @@ -6310,9 +6310,6 @@ int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev, if (unencrypted) flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; - if (cookie) - ctrl_flags |= IEEE80211_TX_CTL_REQ_TX_STATUS; - flags |= IEEE80211_TX_INTFL_NL80211_FRAME_TX; skb = dev_alloc_skb(local->hw.extra_tx_headroom + -- 2.53.0