Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp564552imu; Thu, 20 Dec 2018 01:26:56 -0800 (PST) X-Google-Smtp-Source: AFSGD/UjbJrYaX6BsdbE3rE0jqNg9WaoB4ddQd5TaaPNRJ5XZoa2HdveOfAuAsippxNz8uvHPqmu X-Received: by 2002:a63:557:: with SMTP id 84mr21819812pgf.411.1545298016415; Thu, 20 Dec 2018 01:26:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545298016; cv=none; d=google.com; s=arc-20160816; b=dnYnZDedADa+I5dckDJvdxmmII2DDjqVPemzafIVPzwJMNA76TRc+MKV3ZSyYpzQlR BodJ/48KMU+4BR9AbTOz3tqLe0Vu3BYWuftT+6rvKu0Mf9360c9Rxh9o5NqPaAHndhTu zxP9yDQSOaGQROJRRbLwSRrG0krau9rzQ1rRNyUbK1O6p0T03DTUA2hRDDkdD+smb7JC Tx638b0DkfKOpbHztO8NK4HEeBdrU+12gevyWdl7jJjAr5m5MKRR6eLmr9eBAJ3mMkuo B7X7ordu9HT/Ahd6t9FFdJjB9dIo9EFYw128EtfJSCuR7Al8+T7Cn/9/UJyi18XrUuiJ 9Cpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cfKDdeQs/5+OcfutCW6uqnDRnnrZQNqSPw01uHHzvwo=; b=CtxEkXczxqCkVxzeHxHqD3603ntRRYHRzS1jhATlxiI+rXMRL3GR2oxcnt01f7WI7g OqC+BSFPvpy7GVS8gS96EL/wFTTWCF2jWPTYLK41Xd+meWeyL9Rr+ny7xd+/iCvbfUqe WdB1XSe/MI1Uwo1IpB4sgr98E4f0M5XdUL787IjB6ktU6XmeFJAsVQMVW+rm7lXaCLeB stbteK8lAua9bBdfVnvDfhDdrGD5oZmXpsBDwkKbUYqjANVYTMtHUiCzBDKHpBSuBzI5 iYWoUOIY/QPXsZy6JS9TFHYAv8LaXCu9EvKQOac9Tw+bLAk+c3XPqzFKU2giknbxqHkn ZHgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zEA9KmTs; 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 h13si17041605pgs.17.2018.12.20.01.26.41; Thu, 20 Dec 2018 01:26:56 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=zEA9KmTs; 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 S1731813AbeLTJY1 (ORCPT + 99 others); Thu, 20 Dec 2018 04:24:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:34776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731802AbeLTJYY (ORCPT ); Thu, 20 Dec 2018 04:24:24 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 29F49217D9; Thu, 20 Dec 2018 09:24:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545297863; bh=vasmiCniDwciFl5jvi9OenQmkFJQYeKzPCJFbPbCQc8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zEA9KmTsiNCEEG1LZaknHVJjqtC4y9hSFvihZtxs+gkiiFTtZXGO0W6Oe4qRmQH6+ vTLhdOUlSe+ySwwPB13+1eeFfS1W2nn0n4U//rK4/vtEQAvgU4P7FYX29whlAXAOF6 dW8u4dwVdqUmcJwpAkkIMN7u63CcYff1rq/2SN50= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ilan Peer , Luca Coelho , Johannes Berg , Sasha Levin Subject: [PATCH 4.9 18/61] mac80211: Fix condition validating WMM IE Date: Thu, 20 Dec 2018 10:18:18 +0100 Message-Id: <20181220085844.470045269@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20181220085843.743900603@linuxfoundation.org> References: <20181220085843.743900603@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. ------------------ [ Upstream commit 911a26484c33e10de6237228ca1d7293548e9f49 ] Commit c470bdc1aaf3 ("mac80211: don't WARN on bad WMM parameters from buggy APs") handled cases where an AP reports a zeroed WMM IE. However, the condition that checks the validity accessed the wrong index in the ieee80211_tx_queue_params array, thus wrongly deducing that the parameters are invalid. Fix it. Fixes: c470bdc1aaf3 ("mac80211: don't WARN on bad WMM parameters from buggy APs") Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/mac80211/mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 7811650e76c4..6e0aa296f134 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1867,7 +1867,7 @@ static bool ieee80211_sta_wmm_params(struct ieee80211_local *local, params[ac].acm = acm; params[ac].uapsd = uapsd; - if (params->cw_min == 0 || + if (params[ac].cw_min == 0 || params[ac].cw_min > params[ac].cw_max) { sdata_info(sdata, "AP has invalid WMM params (CWmin/max=%d/%d for ACI %d), using defaults\n", -- 2.19.1