Received: by 10.213.65.68 with SMTP id h4csp226339imn; Fri, 23 Mar 2018 03:20:24 -0700 (PDT) X-Google-Smtp-Source: AG47ELvVlrW2sL8UXaBTuijZe1S2PwZ1o7WlJ2+rwW6WRvW2utxE79lbfxnPtXvSNc+ve6U/T61w X-Received: by 2002:a17:902:7787:: with SMTP id o7-v6mr29057960pll.75.1521800424889; Fri, 23 Mar 2018 03:20:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521800424; cv=none; d=google.com; s=arc-20160816; b=XKY9590CVFthVLyqhVtuEMqKVmjp73elvIKbZM1nzPZ3jgtFaP3kPNkrqzk3kMari6 IIAStPf8XkhbYb/gVMdYTOGgDFTQwjKSgHJLGpFvKnJlEuOTS3QHw5Ev1w5vm5u8iWfZ C7TOcSJu4BJSKMpwwhx5KI3Sn8HvfLm+3NQgUB9/hNyQA62830l32OupygmQVFp628JG pVMOYq6qtYCHbqArh44u97B2WUxe0j0/VpTt752HhjwnYlSLTSOiU/57sEX1HcYDxbE0 P28EA6/7Pzh3a0c1xR+cLX/LTr1rycO/Lh6u/vYJzfWSdMFLwffcM203qP5RALrDDKfu A1Yg== 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=sAaMZGBidKpeKjaKbzRyjKTPgzoXuCwdvdkQdXDsW9k=; b=o0LpVzJj32ja0kTgyKkm7SvHU9WrDgogg8LQskxWjOq3TWWKgMzJIrkRU6bsoFTsWw pR87RU4DZwR4fW9kXWyf4GSoU76Q4uQ4YorWRO9+N4yNY+TH5JfQwdPrk+iGqVAiOIZY ITQTsfIA8inyGY/QHwidW/eAql03fydF9w2QMVeOkeKsotjVeQ3ERpQnidfsn7BxA3H/ B+DrL2agGV5KWwxc2afVZvH/hCG9X4SFayTjbmCjybc6A790wxzCUYXQjJa2N/wAbog6 cPHt1IwetNOSjPBZdTcXCocxPUe6DQIwyiVXsCWAEQDalXRqZGFKq4pmJGvVIqYrcW3y wmzg== 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 c10-v6si8468618pla.602.2018.03.23.03.20.10; Fri, 23 Mar 2018 03:20:24 -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 S1756167AbeCWKT0 (ORCPT + 99 others); Fri, 23 Mar 2018 06:19:26 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:48066 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756156AbeCWKTW (ORCPT ); Fri, 23 Mar 2018 06:19:22 -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 00FBAF2C; Fri, 23 Mar 2018 10:19:21 +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 3.18 26/47] mac80211: dont parse encrypted management frames in ieee80211_frame_acked Date: Fri, 23 Mar 2018 10:55:17 +0100 Message-Id: <20180323094249.235716745@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323094248.117679641@linuxfoundation.org> References: <20180323094248.117679641@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 3.18-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)) {