Re: [PATCH v2] usb: musb: fix use-after-free in musb_remove()
From: Johan Hovold
Date: Fri Nov 20 2026 - 09:51:36 EST
On Fri, Nov 20, 2026 at 03:23:14PM +0100, Joshua Crofts wrote:
> Currently in musb_remove(), musb_platform_exit() drops the PHY refcount
> before usb_phy_shutdown() is called, causing a use-after-free bug.
This is too strongly worded. There is a potential for a use-after-free
here but it's extremely unlikely to ever be an issue in practice as the
phy driver would need to be unloaded by root while they are already
unbinding the host controller.
Why would root want to do that to themselves?
Johan