Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp774531imu; Thu, 20 Dec 2018 05:15:11 -0800 (PST) X-Google-Smtp-Source: AFSGD/X3lorUYBBws02X8j9ngslgAR4QxjOwLzvqIfaPyyEkggqHVXIoY0JonAugjd584K8f7rQ/ X-Received: by 2002:a17:902:4681:: with SMTP id p1mr24779481pld.184.1545311711523; Thu, 20 Dec 2018 05:15:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545311711; cv=none; d=google.com; s=arc-20160816; b=e5ayWvlfnq4dx6lC6Js+CdHIggt/IQ2Ui25DXbveaNCyKOC4bd8sUM5WVdQq3BvUzF dpivoiT4P+HUDwWguqSzdBh+VnuWeYtyvA0fT6y+k6/CclRUGy+xuLSABE3amHUuckQi Oyp93e0996/n6TWLkqgH3mbNaGpAuzPkdSEuLWN/w+kDuUdGmH6gGlYeqw80r6ZHIRYe n5t6jfg81ZcwySJeLN8ci4+JhuW0FnNbLGDezP3Su3bqan16xrcHR4ewCUSxkFthLjxs iTQNgDzZmewqxKrA2XVbKRqAGmW35C6f7qn0UItps2SFgBYIsUIlueMu+ovL8eGTOIDr O3yA== 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=M7BJ8gbtvBRzlnhOkAO4lMTHLQf50PvQw7+pLubJbQM=; b=Ycw+x45ezLozj5mxwk+y+CuIOtblpaxg3RebnP/rrPqQNXFfNniRcuBm8McLg+8iFT rwvKsjVzaGunUmu0bLhCisdyijEJRVu/hksrHawYkgr/ho/Jv57IUajbmqTt30qdhcKQ nd5497OcqXtuJIopgldRpe2oOlyzso7mk0Glrk6+mQ0ym6usHRsK0HNmLN8ppmy1o7Bn Z4P8AUJCczaAfVYjFuYSJSjAoxiauARKsBRnMt9lGiu6iOyuQewlT3+dSYqpvL9t9OL1 fl3MYpBMITgeQGxtGOXmQtgEckKy9xkFXHJZAfzI5Tt0p8icjegQGiEgP90/f8v6h/90 WZWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tkNbs0B3; 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 p127si19393336pfp.119.2018.12.20.05.14.54; Thu, 20 Dec 2018 05:15:11 -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=tkNbs0B3; 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 S1732450AbeLTJ2T (ORCPT + 99 others); Thu, 20 Dec 2018 04:28:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:44884 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729350AbeLTJ2R (ORCPT ); Thu, 20 Dec 2018 04:28:17 -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 362B220989; Thu, 20 Dec 2018 09:28:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545298096; bh=+Qqfbg4II23FUuZqQJ+GCFdY6r+P+zyOOIsRYWuZg64=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tkNbs0B3/PjOpkjjQbX0QBkxfVZyLHEvBEga3DOLwGTwlwRvijtUxqOkYu4spicq1 ya8wG/7bGPSMTKM43GmHBsEFOYb8Htxa2PnMK64htM0xYmSvFzROBct48+umnQRcEw 3NdQGXfFUzYpUKaInz6fF+fPnaw1r4qLM8f7jXi4= 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.14 33/72] mac80211: Fix condition validating WMM IE Date: Thu, 20 Dec 2018 10:18:32 +0100 Message-Id: <20181220085923.646831980@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20181220085922.332225035@linuxfoundation.org> References: <20181220085922.332225035@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.14-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 75909a744121..4c59b5507e7a 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1861,7 +1861,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