From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jia-Ju Bai <baijiaju1990@gmail.com>
Cc: mathias.nyman@intel.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: usb: host: xhci_debugfs: Fix a null pointer dereference in xhci_debugfs_create_endpoint()
Date: Sat, 4 May 2019 08:33:40 +0200 [thread overview]
Message-ID: <20190504063340.GA26311@kroah.com> (raw)
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 <baijiaju1990@gmail.com>
Very rare case, but nice fix. You should put "potential" in your
subject line as this is something that no one should ever hit :)
Anyway:
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <gregkh@linuxfoundation.org>
To: Jia-Ju Bai <baijiaju1990@gmail.com>
Cc: mathias.nyman@intel.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: host: xhci_debugfs: Fix a null pointer dereference in xhci_debugfs_create_endpoint()
Date: Sat, 4 May 2019 08:33:40 +0200 [thread overview]
Message-ID: <20190504063340.GA26311@kroah.com> (raw)
Message-ID: <20190504063340.2wA4Ai418-1kq_8C0g2CaExZ1cy_qzP5u1pNumxXdvI@z> (raw)
In-Reply-To: <20190504033748.17964-1-baijiaju1990@gmail.com>
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 <baijiaju1990@gmail.com>
Very rare case, but nice fix. You should put "potential" in your
subject line as this is something that no one should ever hit :)
Anyway:
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
next prev reply other threads:[~2019-05-04 6:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-04 3:37 usb: host: xhci_debugfs: Fix a null pointer dereference in xhci_debugfs_create_endpoint() Jia-Ju Bai
2019-05-04 3:37 ` [PATCH] " Jia-Ju Bai
2019-05-04 6:33 ` Greg Kroah-Hartman [this message]
2019-05-04 6:33 ` Greg KH
2019-05-04 7:30 ` Jia-Ju Bai
2019-05-04 7:30 ` [PATCH] " Jia-Ju Bai
2019-05-06 11:16 ` Mathias Nyman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190504063340.GA26311@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=baijiaju1990@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).