Memory Leak in tcindex_partial_destroy_work in Kernel
Summary
GSD-2021-1001164: net: sched: fix memory leak in tcindex_partial_destroy_work. Affects Kernel versions >= 8332904aa971ed4547514f57c8b3780ad4f0f949, < cac71d27745f92ee13f0ecc668ffe151a4a9c9b1. 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 provides core functionalities and manages system resources. It acts as an interface between the hardware and software layers, allowing applications to communicate with the underlying hardware. The tcindex_partial_destroy_work function in the Kernel's networking subsystem is responsible for handling traffic control index partial destruction. This function is vulnerable to a memory leak, which can lead to resource exhaustion and potential system instability.
Vulnerability Detail
The memory leak vulnerability in tcindex_partial_destroy_work arises from improper memory management. When this function is called, it fails to release allocated memory in certain scenarios, resulting in a gradual accumulation of unreleased memory. Attackers could potentially exploit this vulnerability by repeatedly triggering the affected function, causing memory exhaustion and potentially crashing the system. The vulnerability was introduced in version v3.18 of the Linux Kernel and has been fixed in version v5.13.6.
How To Fix
No fixed version is published for this vulnerability.
To fix this vulnerability, it is recommended to update the Linux Kernel to version v5.13.6 or later. This update includes the necessary patch to address the memory leak issue in tcindex_partial_destroy_work. Users can obtain the updated Kernel from the official Linux Kernel repository. It is crucial to regularly update the Kernel to ensure the latest security fixes and improvements are applied.
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 a patch manually to fix the memory leak issue in tcindex_partial_destroy_work. Here is an example of the patch:
--- a/net/sched/cls_tcindex.c
+++ b/net/sched/cls_tcindex.c
@@ -123,6 +123,7 @@ static void tcindex_partial_destroy_work(struct work_struct *work)
struct tcindex_filter_result *res;
struct tcf_result *r;
+ kfree(filter);
while ((res = rcu_dereference_protected(filter->result, 1))) {
r = &res->res;
if (r->classid) {
Conclusion
In conclusion, the memory leak vulnerability in tcindex_partial_destroy_work in the Kernel can lead to resource exhaustion and potential system instability. It is crucial to update the Linux Kernel to version v5.13.6 or later to mitigate this vulnerability. Applying the provided patch manually or using the Vulert Playground can serve as temporary workarounds, but updating the Kernel is the recommended solution. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The memory leak vulnerability in tcindex_partial_destroy_work can lead to resource exhaustion and potential system instability. Attackers could exploit this vulnerability to cause memory exhaustion, potentially resulting in system crashes or denial of service.
You can use the Vulert Playground at Vulert Scanner to check if your system is affected by this vulnerability. Simply upload your package-lock.json file, and Vulert will analyze it in real-time to identify any open-source vulnerabilities, including this memory leak issue in tcindex_partial_destroy_work.
Yes, this vulnerability has been fixed in version v5.13.6 of the Linux Kernel. It is recommended to update your Kernel to this version or later to ensure the memory leak issue in tcindex_partial_destroy_work is resolved.
Yes, a workaround for this vulnerability is to manually apply the provided patch to fix the memory leak issue in tcindex_partial_destroy_work. However, it is strongly recommended to update the Linux Kernel to the fixed version instead of relying on workarounds.
You can find more information about this vulnerability, including its technical details and the fix, in the vulnerability report at https://github.com/cloudsecurityalliance/gsd-database/blob/main/2021/1001xxx/GSD-2021-1001164.json
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.
Follow Vulert in Google
Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.