From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 5AAE72BC2 for ; Wed, 29 Jun 2016 13:19:09 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 29 Jun 2016 04:18:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,546,1459839600"; d="scan'208";a="1007407443" Received: from gklab-246-019.igk.intel.com (HELO intel.com) ([10.217.246.19]) by orsmga002.jf.intel.com with SMTP; 29 Jun 2016 04:18:45 -0700 Received: by intel.com (sSMTP sendmail emulation); Wed, 29 Jun 2016 14:19:08 +0200 From: Slawomir Mrozowicz To: declan.doherty@intel.com Cc: dev@dpdk.org, Slawomir Mrozowicz Date: Wed, 29 Jun 2016 14:19:04 +0200 Message-Id: <1467202744-4140-1-git-send-email-slawomirx.mrozowicz@intel.com> X-Mailer: git-send-email 1.9.1 Subject: [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: Wed, 29 Jun 2016 11:19:09 -0000 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 */ -- 1.9.1