Memory Leak in __mdiobus_register in Kernel

Kernel Updated 02 Oct 2025

Summary

28/10/2021
N/A
No i
Unrated
Not published

GSD-2021-1001813: net: mdiobus: Fix memory leak in __mdiobus_register. Affects Kernel versions < b0feaa8376f52357bf2fd020d0c471713a859728. No fix is published. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 →

Share this vulnerability

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.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback