[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171101160336.GA22440@kroah.com>
Date: Wed, 1 Nov 2017 17:03:36 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Jeffy Chen <jeffy.chen@...k-chips.com>
Cc: linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
Mathias Nyman <mathias.nyman@...el.com>
Subject: Re: [PATCH] xhci: Cancel cmd_timer before cleanup the command queue
in xhci_hc_died()
On Fri, Sep 29, 2017 at 05:12:47PM +0800, Jeffy Chen wrote:
> When the cmd_timer fired, it would try to access the command struct.
> So cancel it before cleanup the command queue in xhci_hc_died(), to
> avoid use-after-free reported by KASAN:
> [ 176.952537] BUG: KASAN: use-after-free in xhci_handle_command_timeout+0x68/0x224
> [ 176.960846] Write of size 4 at addr ffffffc0cbb01608 by task kworker/3:3/1680
> ...
> [ 177.180644] Freed by task 0:
> [ 177.183882] kasan_slab_free+0x90/0x15c
> [ 177.188194] kfree+0x114/0x28c
> [ 177.191630] xhci_cleanup_command_queue+0xc8/0xf8
> [ 177.196916] xhci_hc_died+0x84/0x358
>
> Fixes: d9f11ba9f107 ("xhci: Rework how we handle unresponsive or hoptlug removed hosts")
> Signed-off-by: Jeffy Chen <jeffy.chen@...k-chips.com>
> ---
Mathias, did you miss this one? Want me to queue it up?
thanks,
greg k-h
Powered by blists - more mailing lists