From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by dpdk.org (Postfix) with ESMTP id EE3FB23D for ; Mon, 30 Jul 2018 18:22:20 +0200 (CEST) Received: from 1.general.paelzer.uk.vpn ([10.172.196.172] helo=lap.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fkAsa-00009D-RS; Mon, 30 Jul 2018 16:18:40 +0000 From: Christian Ehrhardt To: Bruce Richardson Cc: dpdk stable Date: Mon, 30 Jul 2018 18:13:31 +0200 Message-Id: <20180730161342.16566-166-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180730161342.16566-1-christian.ehrhardt@canonical.com> References: <20180730161342.16566-1-christian.ehrhardt@canonical.com> Subject: [dpdk-stable] patch 'examples/exception_path: fix out-of-bounds read' has been queued to stable release 18.05.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2018 16:22:21 -0000 Hi, FYI, your patch has been queued to stable release 18.05.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/01/18. So please shout if anyone has objections. Thanks. Christian Ehrhardt --- >>From 3b48eaeb0f532ee7e6220b0a52a2094856afb296 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Mon, 16 Jul 2018 17:03:47 +0100 Subject: [PATCH] examples/exception_path: fix out-of-bounds read [ upstream commit 4341adf272144689540a8e0f615f12eef7e21109 ] When printing out stats from the exception_path app, all possible lcore_ids are iterated. However, the app only supports up to 64 cores. To prevent possible errors, and to remove coverity warnings, explicitly check for out-of-range lcore ids before printing. Coverity issue: 268335 Fixes: af75078fece3 ("first public release") Signed-off-by: Bruce Richardson --- examples/exception_path/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c index 2b381a5d8..63a5a0056 100644 --- a/examples/exception_path/main.c +++ b/examples/exception_path/main.c @@ -132,6 +132,9 @@ print_stats(void) " Lcore Port RX TX Dropped on TX\n" "------- ------ ------------ ------------ ---------------\n"); RTE_LCORE_FOREACH(i) { + /* limit ourselves to application supported cores only */ + if (i >= APP_MAX_LCORE) + break; printf("%6u %7u %13"PRIu64" %13"PRIu64" %16"PRIu64"\n", i, (unsigned)port_ids[i], lcore_stats[i].rx, lcore_stats[i].tx, -- 2.17.1