REDHAT-BUG-2400611: Medium severity linux/kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved:
net: phylink: add lock for serializing concurrent pl->phydev writes with resolver
Currently phylinkresolve() protects itself against concurrent phylinkbringupphy() or phylinkdisconnectphy() calls which modify pl->phydev by relying on pl->statemutex.
The problem is that in phylinkresolve(), pl->statemutex is in a lock inversion state with pl->phydev->lock. So pl->phydev->lock needs to be acquired prior to pl->statemutex. But that requires dereferencing pl->phydev in the first place, and without pl->statemutex, that is racy.
Hence the reason for the extra lock. Currently it is redundant, but it will serve a functional purpose once mutexlock(&phy->lock) will be moved outside of the mutexlock(&pl->statemutex) section.
Another alternative considered would have been to let phylinkresolve() acquire the rtnlmutex, which is also held when phylinkbringupphy() and phylinkdisconnectphy() are called. But since phylinkdisconnectphy() runs under rtnllock(), it would deadlock with phylinkresolve() when calling flushwork(&pl->resolve). Additionally, it would have been undesirable because it would have unnecessarily blocked many other call paths as well in the entire kernel, so the smaller-scoped lock was preferred.
Affected Software
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2400611?
The severity of REDHAT-BUG-2400611 is considered critical as it can lead to race conditions affecting concurrent operations.
How do I fix REDHAT-BUG-2400611?
To fix REDHAT-BUG-2400611, update your Linux kernel to the recommended version that addresses this vulnerability.
Which versions of Linux kernel are affected by REDHAT-BUG-2400611?
REDHAT-BUG-2400611 affects specific versions of the Linux kernel; users should check their version against the advisory.
What are the potential impacts of REDHAT-BUG-2400611?
The potential impacts of REDHAT-BUG-2400611 include system instability and unexpected behavior due to improper handling of concurrency.
Is there a workaround for REDHAT-BUG-2400611?
Currently, there is no known effective workaround for REDHAT-BUG-2400611; updating the kernel is the best course of action.