CVE-2026-99446: phy: core: Fix race-condition between _of_phy_get() and try_module_get()
In the Linux kernel, the following vulnerability has been resolved:
phy: core: Fix race-condition between ofphyget() and trymoduleget()
Sashiko asked during a patch review if the existing usage pattern had a race condition; specifically in ofphyget() if it was possible between returning from ofphyget() and running trymoduleget() that a module might be unbound leading to use-after-free.
Looking at the code this appears to be so, there is no linkage between the phy and module under a synchronisation primitive.
Using the phyprovidermutex in phyget() will ensure there is a link between the returned phy pointer and the moduleget() bumping the module reference count.
Amend phyget(), ofphyget() and devmofphygetbyindex() to fix the same usage pattern.
phyproviderunregister() must take the phyprovidermutex so amending phyget()/ofphyget() to take that same mutex guarantees there is no use-after-free.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.117 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.61 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.2