[dpdk-stable] patch 'net/i40e/base: fix potential out of bound array access' has been queued to LTS release 16.11.2

Yuanhan Liu yuanhan.liu at linux.intel.com
Fri Apr 7 10:11:45 CEST 2017


Hi,

FYI, your patch has been queued to LTS release 16.11.2

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

Thanks.

	--yliu

---
>From a44d2b8004f42e9b39548969e3728e07134b3822 Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu at intel.com>
Date: Wed, 22 Mar 2017 17:24:55 +0800
Subject: [PATCH] net/i40e/base: fix potential out of bound array access

[ upstream commit 998c56772d0dc554c0209880d9394a0d14a18c74 ]

This is fix for klocwork issue where dcbcfg->numapps could
be greater than size of array (i.e dcbcfg->app[I40E_DCBX_MAX_APPS]).
The fix makes sure the array is not accessed past size of array
(i.e. I40E_DCBX_MAX_APPS).

Fixes: 166dceeeeafc ("i40e/base: add parsing for CEE DCBX TLVs")

Signed-off-by: Jingjing Wu <jingjing.wu at intel.com>
---
 drivers/net/i40e/base/i40e_dcb.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c
index 26c344f..9b5405d 100644
--- a/drivers/net/i40e/base/i40e_dcb.c
+++ b/drivers/net/i40e/base/i40e_dcb.c
@@ -396,6 +396,8 @@ static void i40e_parse_cee_app_tlv(struct i40e_cee_feat_tlv *tlv,
 	dcbcfg->numapps = length / sizeof(*app);
 	if (!dcbcfg->numapps)
 		return;
+	if (dcbcfg->numapps > I40E_DCBX_MAX_APPS)
+		dcbcfg->numapps = I40E_DCBX_MAX_APPS;
 
 	for (i = 0; i < dcbcfg->numapps; i++) {
 		u8 up, selector;
-- 
1.9.0



More information about the stable mailing list