Messages in this thread | | | Date | Wed, 7 Aug 2019 15:16:09 -0500 | From | Bin Liu <> | Subject | Re: [PATCH] usb: musb: Fix a possible null-pointer dereference in musb_handle_intr_connect() |
| |
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.
| |