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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>

Thanks for finding this,  tested and ...

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


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




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux