Received: by 10.213.65.68 with SMTP id h4csp244166imn; Fri, 23 Mar 2018 03:47:23 -0700 (PDT) X-Google-Smtp-Source: AG47ELteD1Qru36AT9SsIgaLlywts3ae+LL3HdKHX9Bu5jn1uDU9r/hwg1ZKg6ZHU59ZH1tzEE7k X-Received: by 2002:a17:902:34f:: with SMTP id 73-v6mr29032729pld.55.1521802043236; Fri, 23 Mar 2018 03:47:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521802043; cv=none; d=google.com; s=arc-20160816; b=lX+p81nxJJgGTesSpgZCEvIuuvLSGPmA55Od445s0eMk2oC7HyUUVjmNysSkkTggeU nyj47ZKWsPiJClYjvESkodsjWkyn9KdVSUagqRX5pq35Yf50QAoMATc2qMni80lV0KF4 6ubRtMIK9n+NPSc+/883ZJr6+JERDjOV/d+7XrGX7umVpDHLdHEoKafxZ/lMlwyq9Vs2 AiLWvi6bzGKv6SkExwsDiw8F+4yT/aYRE9lb8IHEayRJgemnRjZEg+5eMMR7VbWz3zcA SG+qDZLVjtqo/ocerirop3KgQbqqb/55lJ4BpdqinFZEApN74nVanaaBtgUX9sNvL3yD FWsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=n1Tld1bn6SOL5iK3rRvZP9im8zssS7UNURPIatURLL4=; b=lb4ShZJYO/DQnePMQ+ytY/047vj70qiJq5aQYYDrAjOEk+flFtlLkaA5MzXIB+fdfv Ps7Oi6/r/M5J1Ooh09grzB9/kiG0bFt27Miz/IxWMyXPgUXp0zxxR9q8bLA9S7Bn120p fD5qUweOp6dyR7FjPm4b4pS8x4nv6ElEONztYOIwzDkqNLM9KnPimy/n5OmfzA75eLPA 1qSSDK+/E58c7iQfwuf7owuYPe/FgOYYE4C0zIXojArIi4vzZsQPnipEqh+RsAhOly+s J8Qf/tSAaIVcPTOA2PiQh9UoawkhtoLQj2abw6epyETlM71WlvxUpLaH2nAKCnZqTlI2 0SUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l62si1446505pga.144.2018.03.23.03.47.08; Fri, 23 Mar 2018 03:47:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752275AbeCWKqQ (ORCPT + 99 others); Fri, 23 Mar 2018 06:46:16 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45648 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754228AbeCWKP0 (ORCPT ); Fri, 23 Mar 2018 06:15:26 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 113781292; Fri, 23 Mar 2018 10:15:25 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Emmanuel Grumbach , Luca Coelho , Johannes Berg , Sasha Levin Subject: [PATCH 4.4 50/97] mac80211: dont parse encrypted management frames in ieee80211_frame_acked Date: Fri, 23 Mar 2018 10:54:37 +0100 Message-Id: <20180323094200.416615735@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323094157.535925724@linuxfoundation.org> References: <20180323094157.535925724@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Emmanuel Grumbach [ Upstream commit cf147085fdda044622973a12e4e06f1c753ab677 ] ieee80211_frame_acked is called when a frame is acked by the peer. In case this is a management frame, we check if this an SMPS frame, in which case we can update our antenna configuration. When we parse the management frame we look at the category in case it is an action frame. That byte sits after the IV in case the frame was encrypted. This means that if the frame was encrypted, we basically look at the IV instead of looking at the category. It is then theorically possible that we think that an SMPS action frame was acked where really we had another frame that was encrypted. Since the only management frame whose ack needs to be tracked is the SMPS action frame, and that frame is not a robust management frame, it will never be encrypted. The easiest way to fix this problem is then to not look at frames that were encrypted. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- net/mac80211/status.c | 1 + 1 file changed, 1 insertion(+) --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -194,6 +194,7 @@ static void ieee80211_frame_acked(struct } if (ieee80211_is_action(mgmt->frame_control) && + !ieee80211_has_protected(mgmt->frame_control) && mgmt->u.action.category == WLAN_CATEGORY_HT && mgmt->u.action.u.ht_smps.action == WLAN_HT_ACTION_SMPS && ieee80211_sdata_running(sdata)) {