Refcount Leak in mtk_pcie_subsys_powerup() in Kernel
Summary
GSD-2022-1002727: PCI: mediatek: Fix refcount leak in mtk_pcie_subsys_powerup(). Affects Kernel versions >= 87e8657ba99cac87b84c7f8ead91b44d88345504, < 09b2d906d78ddf5042b1f3e0091835fc6997e8a4. 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 fundamental component of the Linux operating system that provides core functionalities and interfaces with hardware devices. It manages system resources, facilitates communication between software and hardware, and ensures the stability and security of the system. The vulnerability in question affects the Kernel's PCI subsystem, specifically the mtk_pcie_subsys_powerup() function.
Vulnerability Detail
The mtk_pcie_subsys_powerup() function in the Kernel's PCI subsystem suffers from a refcount leak vulnerability. This vulnerability can lead to a resource leak, potentially resulting in system instability or denial of service. The issue arises due to improper handling of reference counts, which can cause resources to be held indefinitely, leading to memory leaks and other resource exhaustion problems.
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 apply the patch provided in the fix commit manually. Here is an example of the patch:
--- a/drivers/pci/controller/pcie-mediatek.c
+++ b/drivers/pci/controller/pcie-mediatek.c
@@ -123,6 +123,7 @@ static int mtk_pcie_subsys_powerup(struct mtk_pcie *pcie)
return PTR_ERR(res);
mtk_pcie_enable_port(pcie, i);
+ kref_put(&pcie->ref, mtk_pcie_free);
}
return 0;
Conclusion
The refcount leak vulnerability in mtk_pcie_subsys_powerup() in the Kernel's PCI subsystem can lead to resource leaks and potential system instability. It is crucial to update the Linux Kernel to version v5.18.3 or later to mitigate this vulnerability. Applying the provided patch or using Vulert's playground can help identify and address the issue. For further support, contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
This vulnerability can lead to resource leaks, potentially causing system instability or denial of service. It is important to update the Kernel to mitigate the risk.
You can use Vulert's playground at Vulert Scanner to check if your system is affected by this vulnerability. Simply upload your package-lock.json file to the playground, and it will provide real-time alerts for open-source vulnerabilities.
At the time of this report, no known exploits for this vulnerability have been identified. However, it is crucial to apply the recommended fix to prevent potential exploitation.
The details regarding remote exploitation are not provided in the vulnerability report. However, keeping the Kernel up to date is essential for overall system security.
For further support on vulnerability remediation or any other security concerns, you can reach out to info@devnack.com.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.