From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id CFBCB2B8D for ; Thu, 30 Jun 2016 10:07:48 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 30 Jun 2016 01:07:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,551,1459839600"; d="scan'208";a="997893018" Received: from gklab-246-019.igk.intel.com (HELO intel.com) ([10.217.246.19]) by fmsmga001.fm.intel.com with SMTP; 30 Jun 2016 01:07:21 -0700 Received: by intel.com (sSMTP sendmail emulation); Thu, 30 Jun 2016 11:05:37 +0200 From: Slawomir Mrozowicz To: declan.doherty@intel.com Cc: dev@dpdk.org, Slawomir Mrozowicz Date: Thu, 30 Jun 2016 11:05:34 +0200 Message-Id: <1467277534-6955-1-git-send-email-slawomirx.mrozowicz@intel.com> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [PATCH v2] examples/l2fwd-crypto: fix 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 08:07:49 -0000 Overrunning array crypto_statistics of 32 64-byte elements at element index 63 using index cdevid. Fixed by extend crypto_statistics array. Coverity ID 120145 Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application") Signed-off-by: Slawomir Mrozowicz --- v2: - correct commit description --- 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 */ -- 1.9.1