usb: musb: sunxi: Fix accessing an released usb phy
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 6ed05c68cbcae42cd52b8e53b66952bfa9c002ce · < 8a30da5aa9609663b3e05bcc91a916537f66a4cd| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usb: musb: sunxi: Fix accessing an released usb phy
Commit 6ed05c68cbca ("usb: musb: sunxi: Explicitly release USB PHY on exit") will cause that usb phy @glue->xceiv is accessed after released.
1) register platform driver @sunxi_musb_driver // get the usb phy @glue->xceiv sunxi_musb_probe() -> devm_usb_get_phy().
2) register and unregister platform driver @musb_driver musb_probe() -> sunxi_musb_init() use the phy here //the phy is released here musb_remove() -> sunxi_musb_exit() -> devm_usb_put_phy()
3) register @musb_driver again musb_probe() -> sunxi_musb_init() use the phy here but the phy has been released at 2). ...
Fixed by reverting the commit, namely, removing devm_usb_put_phy() from sunxi_musb_exit().
From the CVE record · Linux
The Linux kernel’s sunxi MUSB driver can access a USB PHY after releasing it when the MUSB platform driver is unregistered and then registered again. The input does not specify how an attacker could trigger this sequence or whether access or user interaction is required.
Engineers running Linux kernels with the sunxi MUSB driver should check whether their kernel includes the affected code; affected versions are not specified.