linux-mips
[Top] [All Lists]

Re: [PATCH v2 1/2] MIPS: cavium-octeon: fix out-of-bounds array access

To: Aaro Koskinen <aaro.koskinen@nsn.com>, Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH v2 1/2] MIPS: cavium-octeon: fix out-of-bounds array access
From: David Daney <ddaney.cavm@gmail.com>
Date: Fri, 08 Nov 2013 13:45:05 -0800
Cc: David Daney <david.daney@cavium.com>, linux-mips@linux-mips.org, Aaro Koskinen <aaro.koskinen@iki.fi>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=9+ibR8yu17NVlaGwx/7bqhkCKTUqkj8T1JsJZWij8iQ=; b=UHXLzXPZdksCbXN878XA+kfjP4OiSNYSca6YNSiy9QdSlB20S2GXJWDzhLFE+qt0GL bV+d9qYzl4BHsmS7O3+melm2NvBlhABLzccTMvQIKcr0fg5B8vGn+EBklnSSTyPIx0aw HnkkTz+SoB+PLY+O3gt0PnqfUKu4uIIcy2GHDeOr6dAKsYHnjzPDTv9o9ljT4hRJDP+O VO7ywkX6PoNbG2jGKG1I11U0GlUWIufV2MIPeV6KwzXT2yME3e9jJ/dgU1OKoIzOmrIG 65FB/tPKK0H5XxLca5xw5I4Lxh//fDbmzC0u8RYwz/LxvfYmKdPAVDCoWESRNXagMTk3 P0pw==
In-reply-to: <1383318364-30312-1-git-send-email-aaro.koskinen@nsn.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1383318364-30312-1-git-send-email-aaro.koskinen@nsn.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7
On 11/01/2013 08:06 AM, Aaro Koskinen wrote:
When booting with in-kernel DTBs, the pruning code will enumerate
interfaces 0-4. However, there is memory reserved only for 4 so some
other data will get overwritten by cvmx_helper_interface_enumerate().

Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com>

Thanks for finding this,  tested and ...

Acked-by: David Daney <david.daney@cavium.com>


Ralf:  Please apply.

Aaro: Suggest stable branches that this is a candidate for.

---

        v2: a new patch in the series

  arch/mips/cavium-octeon/executive/cvmx-helper.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper.c 
b/arch/mips/cavium-octeon/executive/cvmx-helper.c
index d63d20d..0e4b340 100644
--- 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) (int pko_port,
  void (*cvmx_override_ipd_port_setup) (int ipd_port);

  /* Port count per interface */
-static int interface_port_count[4] = { 0, 0, 0, 0 };
+static int interface_port_count[5];

  /* Port last configured link info index by IPD/PKO port */
  static cvmx_helper_link_info_t



<Prev in Thread] Current Thread [Next in Thread>