From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id F02F98E85 for ; Fri, 27 Apr 2018 17:57:32 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Apr 2018 08:57:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,335,1520924400"; d="scan'208";a="49652922" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by fmsmga004.fm.intel.com with ESMTP; 27 Apr 2018 08:57:32 -0700 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.118]) by IRSMSX109.ger.corp.intel.com ([169.254.13.170]) with mapi id 14.03.0319.002; Fri, 27 Apr 2018 16:57:30 +0100 From: "Van Haaren, Harry" To: "Burakov, Anatoly" , "dev@dpdk.org" CC: "thomas@monjalon.net" , "Burakov, Anatoly" Thread-Topic: [dpdk-dev] [PATCH v2 2/3] malloc: fix potential out-of-bounds array access Thread-Index: AQHT3H51dFloYVfNS0+rADHmCcjaxqQUxz5w Date: Fri, 27 Apr 2018 15:57:30 +0000 Message-ID: References: <157358c48a85cad762a1afb850d130be98997726.1524651111.git.anatoly.burakov@intel.com> In-Reply-To: <157358c48a85cad762a1afb850d130be98997726.1524651111.git.anatoly.burakov@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzVhNTY3MmMtOWU1Zi00MzBmLWFiZjYtZjdmODIzYjUxNGE0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJpUXJcL01HSUxMdU16aFRnbmFYdE5YVW1uRkI1VmhJRDRsQ0NMNXg4c2c0ckYyaGs5Z21WdGM3SEQ4QjNWM0NzRCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 2/3] malloc: fix potential out-of-bounds array access 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: Fri, 27 Apr 2018 15:57:33 -0000 > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Anatoly Burakov > Sent: Wednesday, April 25, 2018 11:16 AM > To: dev@dpdk.org > Cc: thomas@monjalon.net; Burakov, Anatoly > Subject: [dpdk-dev] [PATCH v2 2/3] malloc: fix potential out-of-bounds ar= ray > access >=20 > Technically, while the pointer would've been invalid if msl_idx > were invalid, we wouldn't have actually attempted to access the > pointer until verifying the index. Fix it by moving array access > to after we've verified validity of the index. >=20 > Coverity issue: 272574 >=20 > Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists") > Cc: anatoly.burakov@intel.com >=20 > Signed-off-by: Anatoly Burakov Acked-by: Harry van Haaren