Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp213190yba; Sat, 4 May 2019 00:32:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqx11u/tC68e2SxwkGrkBq3/gTTR3euvFvJ+2FIFy8iPMRk5K1AyoIhwzWRXrIrpRGkPpgqk X-Received: by 2002:a63:8bc9:: with SMTP id j192mr16417266pge.212.1556955166263; Sat, 04 May 2019 00:32:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556955166; cv=none; d=google.com; s=arc-20160816; b=bqJm6guCYYvvLAeSiOTXqubI3HuBk1z3xUmhE7JLwdL+wKUjxLIGmIYI68Fmj7T/1E LQUvkHlKrfO6+I+ED76svHxCR8D+HBKqagdzPL5aGacWuvYIdQ+LJu6Gp4roydXU5Oys ctAWUEZmELhquAcEVMROE4TzcsrXnINCh4IfNd8u0P6aAaEfIVQ6atdQjtiBWTCw5TWp vCuWuFXp1WkyfCBjpKdUQeESFKj6ZXw5zBv1CeuAIxr7p7DuzLGdlTIghfdfFcHVtbAT QDi5eNi+jxmk8qyItOgVJHjpwqJ2oJMHpgcGnbcwkHRHZvyvrQyhzQadcGOdpJRZ2MR8 999Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=EwweiBCfeJ/cKJj/kqdEZt5KyrfkU7tGiFKFsGG/ynM=; b=lU58J/RVkqHCQUXmflW0S+m04sFxdkAeetGD4s/1sGLMA4p6cijOWAOS1uji0LMGu1 Jc+ugMvO7L9rSKVkl+Lh63xYDML8ik0dfQUQou71j7k65K788s9P8kKLD7l9ZmO7oG+R AEOUKS3pnSmaOBT0Dwiwl5zEtxpk5MUnOgaa1Mtktwrmi5EAo9aE0j4Vd8yPfGh+47/s 9UORneYTnCHWtQyzc2+l4BqXj4obqcdn0XsxvObFE4lCzutkkZ/IxVEX7bXrqvZBtM8x p4YYc+2qZeBfaIDIbUSDJ3wgsuqPfyFFUXK2Nd3/4RQWyPNx4iT7eDqRD68Y+F8GVYXf TIIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ge81vD4k; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k33si6471409pld.27.2019.05.04.00.32.30; Sat, 04 May 2019 00:32:46 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ge81vD4k; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726500AbfEDHa7 (ORCPT + 99 others); Sat, 4 May 2019 03:30:59 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:38944 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726178AbfEDHa6 (ORCPT ); Sat, 4 May 2019 03:30:58 -0400 Received: by mail-pl1-f195.google.com with SMTP id e92so3805885plb.6; Sat, 04 May 2019 00:30:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=EwweiBCfeJ/cKJj/kqdEZt5KyrfkU7tGiFKFsGG/ynM=; b=ge81vD4ktejLRqGTFd9opeJ/bQJ81OT/HtLTZzaN081dOnSgLk/b4K2qCWI3DuNOFL hfc4X2tNsk30NvPs1jLB+XcdWr20To+HKWCNte0d21hYM1a1a3ttIoQiVLyjK5uLvCxa oTMnOHFyaCUcu/vlLC+M1HGJnrERA1RECs9fwpDdoE60z3e16wsUl42bRcglYlOSKszs eMeuMwtXjpPLHTUCkZfhYQZ5sbBS//NQ9P3FMM3GVL5EKiucHHGacmZT3j9U8Znnlcyq LWl3+W5m//QptC1QEeeWS73cG4dRjlK94XBzIDJ5oXfwDlnwtOIu5KfjbTkVD5xBBC1Z 4l7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=EwweiBCfeJ/cKJj/kqdEZt5KyrfkU7tGiFKFsGG/ynM=; b=iZZKs1gOGgDXJ8tUZ9GQlpebNb+0uqHRZ4jjug/8Qg0GaW8opuuXjB/M3bLPrdLQ1P yMXDKBem3JXgMlokH5Mr9Y6JX2v8EUnVJkQjanI5RcAOHcKmxgUhiCX0T+/qSjESrv6u Fb0KGLVgEBtyV7qfr8oRQa1Nfu3++/4q/A2wrGxVSYHTNlftJTG+Bke0bOSVyq/47LBS pRUXIb3fSq0zIVAf2N10APx+pBd/21wNadI8zPPnofGXCcb0mRtuTlwHLKYNKouS3b91 vA0dFEX3Iy5YHfEYwGWGkkt+76AtqGIoOXfp+Vg92py8/e11ZI9OUzswIyneawKtKx/m foGA== X-Gm-Message-State: APjAAAU8h27rtCdSZfE3wczdSrW/i6jpdwsDVIOHAUpC4wn1hIqfVlr6 YMZGn5tJCDnocs4Yys4In58zcK/t X-Received: by 2002:a17:902:2702:: with SMTP id c2mr16524210plb.277.1556955057920; Sat, 04 May 2019 00:30:57 -0700 (PDT) Received: from ?IPv6:2402:f000:1:1501:200:5efe:166.111.71.43? ([2402:f000:1:1501:200:5efe:a66f:472b]) by smtp.gmail.com with ESMTPSA id j6sm5711397pfe.107.2019.05.04.00.30.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 May 2019 00:30:56 -0700 (PDT) Subject: Re: [PATCH] usb: host: xhci_debugfs: Fix a null pointer dereference in xhci_debugfs_create_endpoint() To: 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: Jia-Ju Bai Message-ID: Date: Sat, 4 May 2019 15:30:53 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20190504063340.GA26311@kroah.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 :) Best wishes, Jia-Ju Bai