From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 98640DE0 for ; Tue, 19 Sep 2017 11:16:19 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP; 19 Sep 2017 02:16:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,417,1500966000"; d="scan'208";a="901721236" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.57]) ([10.237.220.57]) by FMSMGA003.fm.intel.com with ESMTP; 19 Sep 2017 02:16:17 -0700 To: Yong Wang , wenzhuo.lu@intel.com Cc: dev@dpdk.org References: <1505220240-30600-1-git-send-email-wang.yong19@zte.com.cn> From: Ferruh Yigit Message-ID: <30f82422-1147-1b8b-4f09-d0565960044f@intel.com> Date: Tue, 19 Sep 2017 10:16:16 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1505220240-30600-1-git-send-email-wang.yong19@zte.com.cn> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] net/e1000: fix memcpy length error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 09:16:20 -0000 On 9/12/2017 1:44 PM, Yong Wang wrote: > The size of "flex_filter.filter_info.mask" and "filter->mask" is 16 > bytes, but the length of memcpy--"RTE_ALIGN(filter->len, sizeof(char)) > / sizeof(char)" may reach 128 bytes which may cause array access out > of bound. Fix it by replacing "sizeof(char)" by "CHAR_BIT". > > Signed-off-by: Yong Wang Reviewed-by: Ferruh Yigit