From: Bin Liu <b-liu@ti.com>
To: Jia-Ju Bai <baijiaju1990@gmail.com>
Cc: <gregkh@linuxfoundation.org>, <linux-usb@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: musb: Fix a possible null-pointer dereference in musb_handle_intr_connect()
Date: Wed, 7 Aug 2019 15:16:09 -0500 [thread overview]
Message-ID: <20190807201609.GD14027@uda0271908> (raw)
In-Reply-To: <20190729090428.29508-1-baijiaju1990@gmail.com>
On Mon, Jul 29, 2019 at 05:04:28PM +0800, Jia-Ju Bai wrote:
> In musb_handle_intr_connect(), there is an if statement on line 783 to
> check whether musb->hcd is NULL:
> if (musb->hcd)
>
> When musb->hcd is NULL, it is used on line 797:
> musb_host_poke_root_hub(musb);
> if (musb->hcd->status_urb)
>
> Thus, a possible null-pointer dereference may occur.
>
> To fix this bug, musb->hcd is checked before calling
> musb_host_poke_root_hub().
>
> This bug is found by a static analysis tool STCheck written by us.
>
> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Applied. Thanks.
-Bin.
prev parent reply other threads:[~2019-08-07 20:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-29 9:04 [PATCH] usb: musb: Fix a possible null-pointer dereference in musb_handle_intr_connect() Jia-Ju Bai
2019-08-07 20:16 ` Bin Liu [this message]
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=20190807201609.GD14027@uda0271908 \
--to=b-liu@ti.com \
--cc=baijiaju1990@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.