Memory Leak in __mdiobus_register in Kernel
Summary
GSD-2021-1001777: net: mdiobus: Fix memory leak in __mdiobus_register. Affects Kernel versions < bc5f2f3431ced08300e4cb3aff35f1da14c26433. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Kernel is a crucial component of the Linux operating system that manages system resources and facilitates communication between hardware and software. It provides essential functionalities such as process management, memory management, and device drivers. The __mdiobus_register function in the Kernel's mdiobus module is responsible for registering a new MDIO bus. MDIO (Management Data Input/Output) is a standard interface used to communicate with Ethernet PHYs (Physical Layer Transceivers) in networking devices. This vulnerability in __mdiobus_register leads to a memory leak, which can result in the exhaustion of system resources and potential instability.
Vulnerability Detail
The vulnerability in __mdiobus_register arises from a memory leak issue. When a new MDIO bus is registered, memory is allocated to store its information. However, if an error occurs during the registration process, the allocated memory is not properly freed, leading to a memory leak. Over time, repeated instances of this vulnerability can deplete available memory resources, causing system performance degradation or even crashes. Attackers may potentially exploit this vulnerability to exhaust system resources and launch denial-of-service attacks. The vulnerability has been fixed in Linux Kernel version v4.9.288 by commit bc5f2f3431ced08300e4cb3aff35f1da14c26433.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a workaround, users can avoid the vulnerability by refraining from performing actions that trigger the registration of new MDIO buses. However, this may not be feasible in scenarios where the functionality provided by MDIO buses is essential. It is strongly recommended to apply the official fix by updating the Kernel to the patched version.
Conclusion
The memory leak vulnerability in __mdiobus_register can lead to system resource exhaustion and instability. It is crucial to update the Linux Kernel to version v4.9.288 or later to mitigate this vulnerability. Users can obtain the updated Kernel source code from the official repository and compile it, or wait for their Linux distribution to release an updated package. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The vulnerability can lead to a memory leak, causing system resource exhaustion and potential instability. It may also be exploited by attackers to launch denial-of-service attacks.
You can use tools like Vulert (https://vulert.com) to check if your system is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities without requiring access to the code or installation.
A temporary fix is not available for this vulnerability. It is recommended to update the Kernel to the patched version as soon as possible.
This vulnerability does not have a direct remote exploitation vector. However, if an attacker gains access to the system, they may be able to trigger the vulnerability.
There are no known instances of this vulnerability being actively exploited at the moment. However, it is important to apply the fix to prevent potential future exploitation.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.