lkml.org 
[lkml]   [2019]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2019-08-07 22:16    [W:0.049 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site