Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3427798imu; Sun, 11 Nov 2018 14:52:27 -0800 (PST) X-Google-Smtp-Source: AJdET5eJ6QksqokpKeb+FqzmM/F8gwN8FDN74i3GWv/JTs1TB7TWX4H8rAb7of+Wf62QRUY9TEwO X-Received: by 2002:a17:902:9a04:: with SMTP id v4-v6mr17303603plp.247.1541976747417; Sun, 11 Nov 2018 14:52:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541976747; cv=none; d=google.com; s=arc-20160816; b=PKUFUrDAz/FSFba6aPWGMNPZUBF6A5gWim6O76zaLSYerLDgSyIsSVaKy9GAUpPqzn dzX9Wi2yPaM2sH97hEbjwvM6QlOS2hKOWLq8t5eO7myfQQsNb+yzNcNO3HCc4yrGUfuQ jgWupEl+HqPQ2TCwZLdEPbHnCh1fqWyN21uXR082mcz/OrlfzhK5fdtD4ebdOp9jSrtX I9mhqviQdXgMOaE+Qr1YBO9GJuEn27ZDg/sHzV2ju1x+KK3nfemok6W93OcrnJDiA9AQ AA/lDxhiwg7wDHq5rXc55k20mPJuA4hPTYQ6G75Wk/bLXjylWLB5sRfkA7kFZmtpx1sx h1Vg== 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=npkn0Lvh5zj0QZ6DZeFM4d9955DujR4oS8JuOPcDOsY=; b=SjAijlOiz7DnsPw6uVUiX7Y44mNiHqJZp0q943eFLPoxoANGw3weoP8SwwWxciYL9l 9vnAWs4ruGD2ls+734Qg+7hQyGyEaGWtfQEEebNKrDf7QIU3M6I4btuBdxqxZI6zPt0U m5dpRI6EYYzF/wSZ73afbTQSMISJKO+Fa+S2i3mFf2Y55Mth2CSh/PAPlfXFHSGf96px Q2klFUkMyHkXnORqOxvaXSnPdzuT/U9U8WLOedriOoK+mi4jmWZtngpHWKN0q27mtBFE AUqq1Ke8HHErTmJQ0AakR5JDXS1kl4iOCV9r9uU2hNECX3Ss3aIT8e5FcmW0JSVR1tEl AtBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FvdUE0kJ; 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 j12si7802919pgq.26.2018.11.11.14.52.12; Sun, 11 Nov 2018 14:52:27 -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=FvdUE0kJ; 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 S2390982AbeKLIl4 (ORCPT + 99 others); Mon, 12 Nov 2018 03:41:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:54772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404124AbeKLIXF (ORCPT ); Mon, 12 Nov 2018 03:23:05 -0500 Received: from localhost (unknown [206.108.79.134]) (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 E32282241B; Sun, 11 Nov 2018 22:33:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975588; bh=3EOeQuUJC+PScKPe7aPolkBKFZQF5uFe+OToQkyacHE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FvdUE0kJcxHEFkVoW5h+qwdjO77RZ3NFTfcnA0+d+lgmbD1kkaHiUMCTg3t9cMnz4 4jjr1OlSOk11/VN7Meh+OabsaN2xs0043q6jA20KcPXleADRw9mnCS93rutB2O+QS4 qO2Xl550w8wonAbXzJ8eBv07zY9Bxalzxg/R9M8Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aaro Koskinen , Paul Burton , Ralf Baechle , linux-mips@linux-mips.org Subject: [PATCH 4.14 177/222] MIPS: OCTEON: fix out of bounds array access on CN68XX Date: Sun, 11 Nov 2018 14:24:34 -0800 Message-Id: <20181111221702.910992872@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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. ------------------ From: Aaro Koskinen commit c0fae7e2452b90c31edd2d25eb3baf0c76b400ca upstream. The maximum number of interfaces is returned by cvmx_helper_get_number_of_interfaces(), and the value is used to access interface_port_count[]. When CN68XX support was added, we forgot to increase the array size. Fix that. Fixes: 2c8c3f0201333 ("MIPS: Octeon: Support additional interfaces on CN68XX") Signed-off-by: Aaro Koskinen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20949/ Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org # v4.3+ Signed-off-by: Greg Kroah-Hartman --- arch/mips/cavium-octeon/executive/cvmx-helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/mips/cavium-octeon/executive/cvmx-helper.c +++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c @@ -67,7 +67,7 @@ void (*cvmx_override_pko_queue_priority) void (*cvmx_override_ipd_port_setup) (int ipd_port); /* Port count per interface */ -static int interface_port_count[5]; +static int interface_port_count[9]; /** * Return the number of interfaces the chip has. Each interface