Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3470651imu; Sun, 11 Nov 2018 15:51:33 -0800 (PST) X-Google-Smtp-Source: AJdET5flzkNl/67jlf5Ck76xx7hgHhK/94cNPQBdMPBa9SxOhDl9mRkspP15TvrzGb1t2bXEv3CR X-Received: by 2002:a17:902:4165:: with SMTP id e92-v6mr18084040pld.209.1541980293628; Sun, 11 Nov 2018 15:51:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541980293; cv=none; d=google.com; s=arc-20160816; b=B0Je/1W/1YzLoCBVeypRoodtl7pRT06pWSwZcINu6Y39zVaEMprS8NZNNQg898VT78 TJ5xcWjN/RwE5WBn+CJAHVZbkHDLr6Xl0IbpKxzLdfrrNmSLJFkw50eyeOzmgEUAcKF7 1NbbOpb/AcHYst8mcqpaxiS86ZkggOgA/v7kEGU0hn1zzo7ehXlKwWMyjCn1Gia9BXFN DY3OVcmaBfr0gyp6n6B/u5OukdIxZkGFbkxIR8b4KuqFJKLLU4Dolb/abmErQBZJGneQ EXk9fQfI4vR8xpC6/MOKZfimPQL7Gx5Sb1ayaK9k8ylPjNd+VaN15FcHEJnEUoRGKWTr DARQ== 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=WrdSy7p76qO4kdsk4i5RJfml+XLOXTxBlqgPMNdeAvA=; b=p8Gm07CGBo6HgK2+EVvSmUd6ODinxTj+Ao3AbY9nDeyWaNhNeA3X7nw7XooKovWKJ2 cg+QIXq8JIPwqhCLUJ9F768miBCJ54/73UwyotA/bzdEhwXcrKTx/+nge0ZNuuMwVJOb izZbv3k5iIgB3aGxE90+dF12OFhJ/cB1hWR3RgvBcK7o1tBvvzlG+XHWIrKalIH/oqrN /czNXJIGjjnSLspJEKNRgugQjYmXfiNujHEw9XFLH8whEW88HCJIM9POroDRiF1pKbmH fWBpE5YxVj3f3SDpUlcWVOZI1MlH5EdzqcKpNjIICViyQjBOL0VhlXR/n88YuKrnF51G +Kyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Yhqi11tY; 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 i5-v6si2770032plt.108.2018.11.11.15.51.18; Sun, 11 Nov 2018 15:51:33 -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=Yhqi11tY; 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 S1733123AbeKLJlM (ORCPT + 99 others); Mon, 12 Nov 2018 04:41:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:38130 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732918AbeKLISe (ORCPT ); Mon, 12 Nov 2018 03:18:34 -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 5C4C2223AE; Sun, 11 Nov 2018 22:28:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975318; bh=KeildM0kEgZ7B9i7QCvDBBQuJU/0E5QYWJeRTPd8RKE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yhqi11tYArVbN7Sjxy0MXf7WfGt4XhfVW75FqkE/oQpWGY1XVb5WUt11nyG8OwXuq /2HibBUs+Xab4PEqP0LyUGpnWAE/3L3a+npZVtsdc7qt1lZMRf5/T0fxztzw1foLe7 9D3NEGHw3LdMpjiS3nBdwZgnjyCowo09C0R3aMug= 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.19 284/361] MIPS: OCTEON: fix out of bounds array access on CN68XX Date: Sun, 11 Nov 2018 14:20:31 -0800 Message-Id: <20181111221656.139132239@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@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.19-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