Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2328697yba; Mon, 6 May 2019 04:15:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxu3whjPTKE5UNTZ+L9UeoLCKp3g6UnqXU5RbVUwygE1JC3yF32VSWnK+awxeoF86JSIvOh X-Received: by 2002:a63:9dc8:: with SMTP id i191mr30459569pgd.91.1557141302241; Mon, 06 May 2019 04:15:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557141302; cv=none; d=google.com; s=arc-20160816; b=UJw4hrD5s1CgBpiNpKCQCF1Qqb4/KHn8TJcJze/snVkEgcS2XQqh1kvpddDND7Yscg U20NpH1Rgd/NCowAX7o990DKUhtcZIuDt+6lhGBoE/4EDK5wIkPDCzPgM3yg3Ulm83u4 OAMq0CY5m5LiQhV6yldJWxe1etBmH/QvEFlbc3HDDvvGQkxBnzDtMzobfPHE+n8zJH8Q eCRd46tgxEf4Uj6gR+8+1uPSq3nLLwIQxfDv/4l5skjnTAnASIL1Xzd+xt5AJroylar4 /KgEElhkOd88JjsJUsP0JP1t6vYhjMo0Wb0O3CPp/YuVnw62EtXw4/roFdra152wEq4z DfEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=RdMDVo9yyhertAWg2ziDm7+s6mq8zSbWqs24UuHTmJ0=; b=ZCvsuLmt2J62h3yzbT2FBkeIk0hKnAQ1vI2IkIMnjqonoJQijctv/hC3IlUfxjiF3p SermqsDCZwDMaexq3CYmOmcUJYMZIDGwIrU9pWeajreZqLN4/UO3i3+Qywqpq60pbofH PxHhuI42vTG6127iEYzhSp1K1GFBu+BhX41K5v2p58edLDPLmkAMUptqNMl2yqrnXTEb +Kb600ycOUkOx7AUbZXyWPnxFp1OPwhzImKdXAAcORJlfZF906jcukTNeDdVVMc5Wb9Y 9t2JkF/IZ118m1PWoAPn+2j9ZoqLEiP+OqDUwPQc5+RR0GvyrpadteXA7fQMP4TN1iaH tWSw== 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 k15si14777035pls.61.2019.05.06.04.14.46; Mon, 06 May 2019 04:15:02 -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 S1726283AbfEFLN5 (ORCPT + 99 others); Mon, 6 May 2019 07:13:57 -0400 Received: from mga05.intel.com ([192.55.52.43]:16206 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725852AbfEFLN5 (ORCPT ); Mon, 6 May 2019 07:13:57 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 May 2019 04:13:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,437,1549958400"; d="scan'208";a="155495557" Received: from mattu-haswell.fi.intel.com (HELO [10.237.72.164]) ([10.237.72.164]) by FMSMGA003.fm.intel.com with ESMTP; 06 May 2019 04:13:55 -0700 Subject: Re: [PATCH] usb: host: xhci_debugfs: Fix a null pointer dereference in xhci_debugfs_create_endpoint() To: Jia-Ju Bai , Greg KH Cc: mathias.nyman@intel.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190504033748.17964-1-baijiaju1990@gmail.com> <20190504063340.GA26311@kroah.com> From: Mathias Nyman Message-ID: <939faa2c-54a8-1ae9-500c-3e25e1e2c691@linux.intel.com> Date: Mon, 6 May 2019 14:16:30 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4.5.2019 10.30, Jia-Ju Bai wrote: > > > On 2019/5/4 14:33, Greg KH wrote: >> On Sat, May 04, 2019 at 11:37:48AM +0800, Jia-Ju Bai wrote: >>> In xhci_debugfs_create_slot(), kzalloc() can fail and >>> dev->debugfs_private will be NULL. >>> In xhci_debugfs_create_endpoint(), dev->debugfs_private is used without >>> any null-pointer check, and can cause a null pointer dereference. >>> >>> To fix this bug, a null-pointer check is added in >>> xhci_debugfs_create_endpoint(). >>> >>> This bug is found by a runtime fuzzing tool named FIZZER written by us. >>> >>> Signed-off-by: Jia-Ju Bai >> Very rare case, but nice fix.  You should put "potential" in your >> subject line as this is something that no one should ever hit :) > > Okay, Greg, thanks for this advice :) > Adding patch to queue, and added "potential" to subject line. -Mathias