Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1065855ybl; Wed, 14 Aug 2019 10:09:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWl4TF3TQtnlQH5W2TZIqrqZZ69Y+KbKH7SLPhMOuDoRbi/ikPZuLkOpWXuz43DOGYIiXs X-Received: by 2002:a63:3046:: with SMTP id w67mr189477pgw.37.1565802561697; Wed, 14 Aug 2019 10:09:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565802561; cv=none; d=google.com; s=arc-20160816; b=Flbtat1bDg7y60IlWfTH7704g4KX9BSNq6eJg7r+7koD9Yc4BiaolnIqdm7JJpnTiT N75pIJgflYLdRVhwKzln1QBWIY5AK6ZVzmyaGDn6QQN1M7x6Y/1fXHWQ8imCYbqPwCUI 8HtFRfr2zWTN3+ajK+ZsQZgJI0M0xdItzuMdWL7vsGuYKjwrV6oKGFlTKo5Ni+KVyrgf ykQIFMJ3DfoORLs28tCPhIHzrJ3PJWCoOt8kc0LWcPhRx/3nt97tCnZFDrj2y/tyPjKH Hh8OM+vBQFRn1vSeEEZyG9vL//8y+SibP+EpHP1hgBCa/BoxhljHIzq8z3rXljigaFSB WK5Q== 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=d7jhZiTeLdHvzFMlil5VXF9XbIDXyhJcClX6NsPwrow=; b=0fSLSHuReZOX4DxtyCV+m99ImoFIioBqrY3132pq3Eh9QUoHGp5kuD32q0osfCfqbk TE5dr7V7IgHS7odLcyiUTc0jMnUNGg+B57hXLpgQBOMi8uVFCTeHw96LT4wxBGxaU6Xv 86sxYM9D2a/XO7+u3AtbDAFVWsOPVPZ1MbHtX0myAQER6YkQfuKk/0y1uw0Dlb0xO+D2 Cv25ySS7LjSJlJpjeUS6vH0EhTi85GcbD+rZMljuVXyKqRIc07Ahdq2kgZkPD61q2cNL JkbBZe6VZXYixelJLUopsmDRRc+yTF/jvzr/BwidGcR82HC+bz19XCTILyiH1kL2tpjH Czxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lO7CrVCG; 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 o15si256181pll.20.2019.08.14.10.09.05; Wed, 14 Aug 2019 10:09:21 -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; dkim=pass header.i=@kernel.org header.s=default header.b=lO7CrVCG; 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 S1730030AbfHNRH7 (ORCPT + 99 others); Wed, 14 Aug 2019 13:07:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:57726 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730003AbfHNRH6 (ORCPT ); Wed, 14 Aug 2019 13:07:58 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 55A9A214DA; Wed, 14 Aug 2019 17:07:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802477; bh=7u6y6PJryD4iCbF2IuVqPiFbr3X04F7zJDSfs/jAL1M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lO7CrVCGo+p0ddbYx6lCGvYiAvvkBXoyNZ5Cri8bv5TAZ+/DtfGNsARIDwPjlGoVO 82A2Ys72JaPTmmzv75sw0X1iqtBD2pXiQYzR1DsSvPPvHojp5Hsh5y52UPbE/0Axmu Qazj/Nc6MPiWfmJrNh0sIXKNjQNybVxP9Zbc+5kY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Emmanuel Grumbach , Johannes Berg Subject: [PATCH 5.2 141/144] iwlwifi: mvm: fix an out-of-bound access Date: Wed, 14 Aug 2019 19:01:37 +0200 Message-Id: <20190814165805.863457330@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165759.466811854@linuxfoundation.org> References: <20190814165759.466811854@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Emmanuel Grumbach commit ba3224db78034435e9ff0247277cce7c7bb1756c upstream. The index for the elements of the ACPI object we dereference was static. This means that if we called the function twice we wouldn't start from 3 again, but rather from the latest index we reached in the previous call. This was dutifully reported by KASAN. Fix this. Cc: stable@vger.kernel.org Fixes: 6996490501ed ("iwlwifi: mvm: add support for EWRD (Dynamic SAR) ACPI table") Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -753,7 +753,7 @@ static int iwl_mvm_sar_get_ewrd_table(st for (i = 0; i < n_profiles; i++) { /* the tables start at element 3 */ - static int pos = 3; + int pos = 3; /* The EWRD profiles officially go from 2 to 4, but we * save them in sar_profiles[1-3] (because we don't