[dpdk-stable] patch 'examples/exception_path: fix out-of-bounds read' has been queued to LTS release 17.11.4

Yongseok Koh yskoh at mellanox.com
Fri Jul 27 04:31:06 CEST 2018


Hi,

FYI, your patch has been queued to LTS release 17.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/18. So please
shout if anyone has objections.

Thanks.

Yongseok

---
>From 9dad10ed6f2b99a79cdd2017431967171a718ce3 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
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 <bruce.richardson at intel.com>
---
 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 dc1d9641d..ba081e332 100644
--- a/examples/exception_path/main.c
+++ b/examples/exception_path/main.c
@@ -164,6 +164,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.11.0



More information about the stable mailing list