usb: phy: isp1301: fix non-OF device reference imbalance
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c84117912bddd9e5d87e68daf182410c98181407 · < b4b64fda4d30a83a7f00e92a0c8a1d47699609f3| No fix yet |
| Linux Linux | — | No fix yet |
In the Linux kernel, the following vulnerability has been resolved:
usb: phy: isp1301: fix non-OF device reference imbalance
A recent change fixing a device reference leak in a UDC driver introduced a potential use-after-free in the non-OF case as the isp1301_get_client() helper only increases the reference count for the returned I2C device in the OF case.
Increment the reference count also for non-OF so that the caller can decrement it unconditionally.
Note that this is inherently racy just as using the returned I2C device is since nothing is preventing the PHY driver from being unbound while in use.
From the CVE record · Linux
The Linux kernel’s isp1301 USB PHY helper does not increment the returned I2C device’s reference count in the non-OF case, creating a potential use-after-free when the caller releases that reference. The input does not specify how an attacker could trigger this issue or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with the isp1301 USB PHY should check their versions; affected versions are not specified.