Received: by 10.213.65.68 with SMTP id h4csp270019imn; Fri, 23 Mar 2018 04:23:15 -0700 (PDT) X-Google-Smtp-Source: AG47ELvqeoFH8/8g9l1jdOCufbdrZ0i9ctynvT/uYWLGAKqR6p8ExnmXMTvbmZKNvyt9OMaDvrsz X-Received: by 10.101.77.144 with SMTP id p16mr20754406pgq.327.1521804195415; Fri, 23 Mar 2018 04:23:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521804195; cv=none; d=google.com; s=arc-20160816; b=pra5xgdVDwFA0pY6Wy7+gjoYSIeCSRMoOVluJVcUJKFLmffTVKRGVOBx+DLNKzEAM9 lJIScu4YCXq6LMHMP9aPmKPfcQspdB5qcSIJkEW6He32dTcbHz77ofDtfjW17Apix7Ux wqB2UrKuIG39jITic28aBNijMxms/WZ854S/oiURBdfD1QYC/H4JzceFISeDUA5awW0/ iwIAGGI9ufjZ6FULd/XyddEWB2Hu5mqgigwOlXOdrb9AxNv+0KaWKvDPd/ZRmFmLL4CN WdTDX+Jdxbg07V3/Idx98Etc/r4T11oOjy71k7Q1MdKhhaC7CNL0I+aZGKFbeWeNHG1P ROHQ== 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=67WGen8AB3Kniv3ms56S5YwTzRXnJBzQ64hlsDM3OOE=; b=rnA+N0gHhiVtr2SKc3WAlZiyvgCDbus6GyVqhkdehBaCSXslC3Q5bmi+FVOSw6XMGX zOgNoc0CLHTj5b5PRJnf3oBL7mHu9M495V63fYMzKzKkMq8bWPw31tdSJ40gjtLBRfVO tKVti+rFkZgbz6zaYrRpC+s1X24j5VYdZeprrN0qN8ejCX5GS1aUWzbESSdebRbVKWvJ gITyZu9RJtlzHFqTJZWu54PG/AZzoKOwV1rCL6a/KVZxQw/y8KNgaChoask5cSp4L1xV eBD+Ta6F3Wm+ebmJFjRvZ1N6sg0xBcyRj41cgulayJmbeVhmNH7tHnjOGVOEE9D1NDHX e38Q== 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 s4-v6si8130635plj.458.2018.03.23.04.23.01; Fri, 23 Mar 2018 04:23:15 -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 S1752151AbeCWLV4 (ORCPT + 99 others); Fri, 23 Mar 2018 07:21:56 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:41622 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755515AbeCWKIT (ORCPT ); Fri, 23 Mar 2018 06:08:19 -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 A9128E4F; Fri, 23 Mar 2018 10:08:18 +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.9 080/177] mac80211: dont parse encrypted management frames in ieee80211_frame_acked Date: Fri, 23 Mar 2018 10:53:28 +0100 Message-Id: <20180323094208.834059742@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323094205.090519271@linuxfoundation.org> References: <20180323094205.090519271@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.9-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 @@ -200,6 +200,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)) {