AZL-114887: CVE-2026-99446 affecting package kernel 6.6.161.1-1
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.