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 8A40D1B19F; Wed, 11 Oct 2017 15:56:09 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Oct 2017 06:56:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,361,1503385200"; d="scan'208";a="161947850" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by fmsmga006.fm.intel.com with ESMTP; 11 Oct 2017 06:56:07 -0700 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.28]) by irsmsx110.ger.corp.intel.com ([163.33.3.25]) with mapi id 14.03.0319.002; Wed, 11 Oct 2017 14:56:07 +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: AQHTMelTNqazUUd+30mFNHaMeJFC06LezXiQ Date: Wed, 11 Oct 2017 13:56:06 +0000 Message-ID: <60ABE07DBB3A454EB7FAD707B4BB158213C457FA@IRSMSX109.ger.corp.intel.com> References: <1505895624-25734-1-git-send-email-slawomirx.mrozowicz@intel.com> In-Reply-To: <1505895624-25734-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTI3NTc0YjctNDEzMS00ZTZmLThiNWMtNjgxNmI5YjIxYTcxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IlwvQWpYQzVMNHF1UlJwREptcUQ3SklqRDRWZllmbW1SaE4xUlFwNUFQXC9SOD0ifQ== 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:56:10 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Slawomir > Mrozowicz > Sent: Wednesday, September 20, 2017 10:20 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 per_lcore_this_sched->current_lthread->tls->data of > 1024 8-byte elements at element index 1024 using index k. > Fixed by correct check k condition. >=20 > Coverity issue: 143462 > 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_tls.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/examples/performance-thread/common/lthread_tls.c > b/examples/performance-thread/common/lthread_tls.c > index 47505f2d4..58a9a8878 100644 > --- a/examples/performance-thread/common/lthread_tls.c > +++ b/examples/performance-thread/common/lthread_tls.c > @@ -212,7 +212,7 @@ void > */ > int lthread_setspecific(unsigned int k, const void *data) > { > - if (k > LTHREAD_MAX_KEYS) > + if (k >=3D LTHREAD_MAX_KEYS) > return POSIX_ERRNO(EINVAL); >=20 > int n =3D THIS_LTHREAD->tls->nb_keys_inuse; > -- > 2.11.0 Acked-by: Michal Jastrzebski