Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1316908ybd; Wed, 26 Jun 2019 15:28:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqxq7QPrMNQsBVDJqf1vnm5aMkLur3gMRJRVMnnfNUXAPaPK6SvlC4X1OIp2hAyPZjS5l/hH X-Received: by 2002:a17:90a:cf8f:: with SMTP id i15mr1666152pju.110.1561588091128; Wed, 26 Jun 2019 15:28:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561588091; cv=none; d=google.com; s=arc-20160816; b=XfFBioFI6YZ9fyhrusGNeDSoIFOlqzGnglMfuz6FnND1z3tvXjMxCXA555PCkopJrw AIDUrCPrvhYC5PJlzB30zrQIut+v5FnMjdbcgXuYdurWDpabVcFR6rrLz8LzXGze3epM 62ZLxcWp8ictq1LKVBdsNdA7wIxxxqP85v7ulm47rQzl8LPC14XKcP7y2R4wVcqlDlN9 HOS9bN41bdNfzghmPVfL0LZ4HdMrFjEBGjZ6+1cWkXNp6USzcpsG8XOAElr2GMdW2H/w LJuBsZH+4V0nZgVQt2GObLU1lOFvtgZrhXiZ75er+PAnogTaaUBbcHFUELSkQUdnWgu+ +W3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=OeaBCe0QH4aJjzc+ggrtBQ9/0vnY/DUP+Gip7jt87tY=; b=gFiaJSD1HPq5B4824GSKmN+kRZyOHpfrLWubFUphlZiUY5WW80pH7ikVi5UaG42rS5 ffPnB8TQo4J0FaaekPz3GgFc4bZ3G+WZ6+ol8Hn4YCV8l2H5QGhY+5TM3UiB03wqKXYo lcZM845pWqxeURhfQgeLA0kLJXkKdttAVSOpk/x0SwsjZz70zDDDVKbf2TCAM7daqzVc Qid9b/DhAVVxcbGovjRj1fOkG02GNtGhHyfi82H+0vDXvbGEO8Y8Z5KE1hHH3yBaNllV LFk3L57xej6CgyGy2mx5viIYFmBKPFbWeMMO1+ba2sjohOFi9RBJQpiWoEReqQCdq808 F/vQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c12si364156pll.138.2019.06.26.15.27.54; Wed, 26 Jun 2019 15:28:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726606AbfFZW0O convert rfc822-to-8bit (ORCPT + 99 others); Wed, 26 Jun 2019 18:26:14 -0400 Received: from mga01.intel.com ([192.55.52.88]:2978 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726481AbfFZW0O (ORCPT ); Wed, 26 Jun 2019 18:26:14 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jun 2019 15:26:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,421,1557212400"; d="scan'208";a="164503997" Received: from orsmsx110.amr.corp.intel.com ([10.22.240.8]) by orsmga003.jf.intel.com with ESMTP; 26 Jun 2019 15:26:13 -0700 Received: from orsmsx111.amr.corp.intel.com (10.22.240.12) by ORSMSX110.amr.corp.intel.com (10.22.240.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 26 Jun 2019 15:26:12 -0700 Received: from orsmsx104.amr.corp.intel.com ([169.254.4.70]) by ORSMSX111.amr.corp.intel.com ([169.254.12.236]) with mapi id 14.03.0439.000; Wed, 26 Jun 2019 15:26:12 -0700 From: "Bowers, AndrewX" To: "intel-wired-lan@lists.osuosl.org" , "netdev@vger.kernel.org" CC: "kernel-janitors@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [Intel-wired-lan] [PATCH][net-next] iavf: fix dereference of null rx_buffer pointer Thread-Topic: [Intel-wired-lan] [PATCH][net-next] iavf: fix dereference of null rx_buffer pointer Thread-Index: AQHVJqupVXnzcA+L3kOQDxvwkDnUOqaujuOg Date: Wed, 26 Jun 2019 22:26:11 +0000 Message-ID: <26D9FDECA4FBDD4AADA65D8E2FC68A4A1D3FB501@ORSMSX104.amr.corp.intel.com> References: <20190619143044.10259-1-colin.king@canonical.com> In-Reply-To: <20190619143044.10259-1-colin.king@canonical.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOGIxZTkyNjktNzU5OS00Y2QxLTgzZWMtOTg0ZTczNjMzMzlmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicTZrSGFqK1VITGdcL2VaZjhwS2pJaHo1WTF3aFRLQSt6VGVJMTFtMHhaaGpuXC8xQTR6WGk1UXFLeERVV0hrMzBMIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Intel-wired-lan [mailto:intel-wired-lan-bounces@osuosl.org] On > Behalf Of Colin King > Sent: Wednesday, June 19, 2019 7:31 AM > To: Kirsher, Jeffrey T ; David S . Miller > ; intel-wired-lan@lists.osuosl.org; > netdev@vger.kernel.org > Cc: kernel-janitors@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: [Intel-wired-lan] [PATCH][net-next] iavf: fix dereference of null > rx_buffer pointer > > From: Colin Ian King > > A recent commit efa14c3985828d ("iavf: allow null RX descriptors") added a > null pointer sanity check on rx_buffer, however, rx_buffer is being > dereferenced before that check, which implies a null pointer dereference > bug can potentially occur. Fix this by only dereferencing rx_buffer until after > the null pointer check. > > Addresses-Coverity: ("Dereference before null check") > Signed-off-by: Colin Ian King > --- > drivers/net/ethernet/intel/iavf/iavf_txrx.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) Tested-by: Andrew Bowers