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 1C0FA8DA6 for ; Fri, 27 Apr 2018 17:57:41 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Apr 2018 08:57:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,335,1520924400"; d="scan'208";a="223929960" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by fmsmga006.fm.intel.com with ESMTP; 27 Apr 2018 08:57:40 -0700 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by irsmsx105.ger.corp.intel.com (163.33.3.28) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 27 Apr 2018 16:57:39 +0100 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.118]) by irsmsx111.ger.corp.intel.com ([169.254.2.47]) with mapi id 14.03.0319.002; Fri, 27 Apr 2018 16:57:39 +0100 From: "Van Haaren, Harry" To: "Burakov, Anatoly" , "dev@dpdk.org" CC: "thomas@monjalon.net" , "Burakov, Anatoly" Thread-Topic: [dpdk-dev] [PATCH v2 3/3] malloc: fix potential dereferencing of NULL pointer Thread-Index: AQHT3H8Q9s2S9uBQX0S8f4XtbZEpU6QUx3MA Date: Fri, 27 Apr 2018 15:57:38 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjgwNWI0NmYtM2YxMS00N2ViLWFiNzktZmUwMTQ3YTgyYjMyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJHdGxyZ2FOcitcL1FMZXlOcUlmRHdmSGpySkpqM2xFNktcL0xMVHlNT1dWTTF2Vk1NNXp3bVNVN0RDenRkNU9tR3cifQ== 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 3/3] malloc: fix potential dereferencing of NULL pointer 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:42 -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 3/3] malloc: fix potential dereferencing of= NULL > pointer >=20 > Previous code checked for both first/last elements being NULL, > but if they weren't, the expectation was that they're both > non-NULL, which will be the case under normal conditions, but > may not be the case due to heap structure corruption. >=20 > Coverity issue: 272566 >=20 > Fixes: bb372060dad4 ("malloc: make heap a doubly-linked list") > Cc: anatoly.burakov@intel.com >=20 > Signed-off-by: Anatoly Burakov Had to do a double-take there - that's a novel way of checking pointers - but it actually makes sense here :) Acked-by: Harry van Haaren