From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id C961C9B6B; Wed, 11 Oct 2017 15:55:50 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Oct 2017 06:55:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,361,1503385200"; d="scan'208";a="161458968" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by fmsmga005.fm.intel.com with ESMTP; 11 Oct 2017 06:55:48 -0700 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.28]) by irsmsx105.ger.corp.intel.com ([169.254.7.75]) with mapi id 14.03.0319.002; Wed, 11 Oct 2017 14:55:47 +0100 From: "Jastrzebski, MichalX K" To: "Mrozowicz, SlawomirX" , "Mcnamara, John" CC: "dev@dpdk.org" , "Mrozowicz, SlawomirX" , "ian.betts@intel.com" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] examples/performance-thread: fix out-of-bounds read Thread-Index: AQHTMeespLcWI34IRESMudFlKSXSoqLezWeg Date: Wed, 11 Oct 2017 13:55:46 +0000 Message-ID: <60ABE07DBB3A454EB7FAD707B4BB158213C457E0@IRSMSX109.ger.corp.intel.com> References: <1505894737-25596-1-git-send-email-slawomirx.mrozowicz@intel.com> In-Reply-To: <1505894737-25596-1-git-send-email-slawomirx.mrozowicz@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiN2U4MmFmOTktMTQwYS00NDBkLTk4YWEtMDAyZjlmNTFiYzdjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InA0MVwvbklpSklJMSsweXZlVGpqZWpDRnc0aDFWMVh0Sno4WXArNTZsK09vPSJ9 x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] examples/performance-thread: fix out-of-bounds read 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: Wed, 11 Oct 2017 13:55:51 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Slawomir > Mrozowicz > Sent: Wednesday, September 20, 2017 10:06 AM > To: Mcnamara, John > Cc: dev@dpdk.org; Mrozowicz, SlawomirX > ; ian.betts@intel.com; stable@dpdk.org > Subject: [dpdk-dev] [PATCH] examples/performance-thread: fix out-of- > bounds read >=20 > Overrunning array schedcore of 128 8-byte elements at element index 128 > using index lcoreid. > Fixed by correct check index lcoreid condition. >=20 > Coverity issue: 143461 > Fixes: 116819b9ed0d ("examples/performance-thread: add lthread > subsystem") > Cc: ian.betts@intel.com > Cc: stable@dpdk.org >=20 > Signed-off-by: Slawomir Mrozowicz > --- > examples/performance-thread/common/lthread_sched.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) >=20 > diff --git a/examples/performance-thread/common/lthread_sched.c > b/examples/performance-thread/common/lthread_sched.c > index 98291478e..138a87d32 100644 > --- a/examples/performance-thread/common/lthread_sched.c > +++ b/examples/performance-thread/common/lthread_sched.c > @@ -578,10 +578,9 @@ int lthread_set_affinity(unsigned lcoreid) > struct lthread *lt =3D THIS_LTHREAD; > struct lthread_sched *dest_sched; >=20 > - if (unlikely(lcoreid > LTHREAD_MAX_LCORES)) > + if (unlikely(lcoreid >=3D LTHREAD_MAX_LCORES)) > return POSIX_ERRNO(EINVAL); >=20 > - > DIAG_EVENT(lt, LT_DIAG_LTHREAD_AFFINITY, lcoreid, 0); >=20 > dest_sched =3D schedcore[lcoreid]; > -- > 2.11.0 Acked-by: Michal Jastrzebski