Memory Leak in __mdiobus_register in Kernel
Summary
GSD-2021-1001813: net: mdiobus: Fix memory leak in __mdiobus_register. Affects Kernel versions < b0feaa8376f52357bf2fd020d0c471713a859728. 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 critical component of the Linux operating system that manages system resources and facilitates communication between hardware and software. It provides essential functionalities for the proper functioning of the system. The __mdiobus_register function is part of the network subsystem and is responsible for registering a management data input/output bus (MDIO bus) in the kernel. The MDIO bus is used to communicate with Ethernet PHYs (Physical Layer transceivers) and other network devices. This vulnerability in __mdiobus_register can lead to a memory leak, which can result in resource exhaustion and potential system instability.
Vulnerability Detail
The vulnerability in __mdiobus_register arises from a memory leak issue. When a MDIO bus is registered in the kernel, memory is allocated to store the bus structure. However, if the registration fails due to an error, the allocated memory is not properly freed, leading to a memory leak. This can occur during system initialization or when a network device is added or removed. Over time, repeated memory leaks can deplete system resources and cause performance degradation or even system crashes. An attacker may be able to exploit this vulnerability to exhaust system memory and disrupt normal system operation.
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 memory leak issue by avoiding scenarios that trigger the error condition during MDIO bus registration. This may involve careful management of network device additions and removals, as well as ensuring proper initialization of the system. However, applying the official fix by updating the Kernel is the recommended solution.
Conclusion
The memory leak vulnerability in __mdiobus_register can have serious consequences on the stability and performance of the Linux Kernel. It is crucial to update the Kernel to the patched version to mitigate this vulnerability. Applying the fix will ensure that memory is properly managed during MDIO bus registration, preventing resource exhaustion and potential system crashes. For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The vulnerability can lead to a memory leak, which can result in resource exhaustion and potential system instability. It may cause performance degradation or system crashes, impacting the availability and reliability of the system.
An attacker may be able to exploit this vulnerability by repeatedly triggering the error condition during MDIO bus registration. By doing so, they can cause memory leaks and exhaust system resources, leading to system instability and potential denial-of-service attacks.
There is no known evidence of this vulnerability being actively exploited at the moment. However, it is important to apply the fix to prevent any potential exploitation in the future.
The vulnerability is present in versions of the Linux Kernel prior to v5.4.156. Therefore, systems running older versions may be affected. It is recommended to update to the patched version to mitigate the vulnerability.
For more details about this vulnerability, including the specific code changes and commit, you can refer to the source link provided in the vulnerability details section.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.