From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 2C6E6374C for ; Fri, 7 Apr 2017 10:15:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491552915; x=1523088915; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=BKVQpkxN/FUFBh0hD1agsV/nP6kUU9HxSfyhEjjfqmE=; b=poGbmzDj1CBP0HnyZkBsk4luIjaGKmSyzDrexfMAtlEm97yue9lOKHJm gkgVRQTwNDJLfi9tMPPcXd+41ank0w==; Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Apr 2017 01:15:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,164,1488873600"; d="scan'208";a="953273507" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by orsmga003.jf.intel.com with ESMTP; 07 Apr 2017 01:15:13 -0700 From: Yuanhan Liu To: Jingjing Wu Cc: Yuanhan Liu , dpdk stable Date: Fri, 7 Apr 2017 16:11:45 +0800 Message-Id: <1491552724-3034-28-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1491552724-3034-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1491552724-3034-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [dpdk-stable] patch 'net/i40e/base: fix potential out of bound array access' has been queued to LTS release 16.11.2 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: Fri, 07 Apr 2017 08:15:15 -0000 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 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 --- 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