From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 8138F2935 for ; Thu, 30 Jun 2016 11:20:10 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 30 Jun 2016 02:20:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,551,1459839600"; d="scan'208";a="1012646293" Received: from dwdohert-dpdk.ir.intel.com ([163.33.210.152]) by fmsmga002.fm.intel.com with ESMTP; 30 Jun 2016 02:20:05 -0700 To: Slawomir Mrozowicz References: <1467202744-4140-1-git-send-email-slawomirx.mrozowicz@intel.com> Cc: dev@dpdk.org From: Declan Doherty Message-ID: Date: Thu, 30 Jun 2016 10:15:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <1467202744-4140-1-git-send-email-slawomirx.mrozowicz@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] examples/l2fwd-crypto: out-of-bounds read X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jun 2016 09:20:11 -0000 On 29/06/16 13:19, Slawomir Mrozowicz wrote: > Overrunning array crypto_statistics of 32 64-byte elements > at element index 63 using index cdevid. > Fixed by extend crypto_statistics array. > > Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application") > Coverity ID 120145 > > Signed-off-by: Slawomir Mrozowicz > --- > examples/l2fwd-crypto/main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c > index 8dc616d..70fada5 100644 > --- a/examples/l2fwd-crypto/main.c > +++ b/examples/l2fwd-crypto/main.c > @@ -243,7 +243,7 @@ struct l2fwd_crypto_statistics { > } __rte_cache_aligned; > > struct l2fwd_port_statistics port_statistics[RTE_MAX_ETHPORTS]; > -struct l2fwd_crypto_statistics crypto_statistics[RTE_MAX_ETHPORTS]; > +struct l2fwd_crypto_statistics crypto_statistics[RTE_CRYPTO_MAX_DEVS]; > > /* A tsc-based timer responsible for triggering statistics printout */ > #define TIMER_MILLISECOND 2000000ULL /* around 1ms at 2 Ghz */ > Acked-by: Declan Doherty