Memory Leak in net: sched: tcindex_partial_destroy_work
Summary
GSD-2021-1001242: net: sched: fix memory leak in tcindex_partial_destroy_work. Affects Kernel versions >= 8332904aa971ed4547514f57c8b3780ad4f0f949, < 8e9662fde6d63c78eb1350f6167f64c9d71a865b. 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 Linux Kernel is a widely used open-source operating system that provides the core functionality for various Linux distributions. It includes a networking subsystem that implements traffic control (tc) mechanisms. One of the components in this subsystem is the tcindex_partial_destroy_work function, which is responsible for destroying a partial tcindex classifier. However, a memory leak vulnerability has been identified in this function, which can lead to the exhaustion of system memory resources.
Vulnerability Detail
The memory leak vulnerability in tcindex_partial_destroy_work arises due to the improper handling of memory deallocation. When destroying a partial tcindex classifier, the function fails to release certain memory resources, resulting in a gradual accumulation of unreleased memory. An attacker could potentially exploit this vulnerability by repeatedly creating and destroying partial tcindex classifiers, causing a significant depletion of system memory. This could lead to a denial-of-service (DoS) condition or other adverse effects on system performance.
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 a patch or backport the fix to their current kernel version. Here is an example of a patch that addresses the memory leak issue:
--- a/net/sched/cls_tcindex.c
+++ b/net/sched/cls_tcindex.c
@@ -123,6 +123,8 @@ static void tcindex_partial_destroy_work(struct work_struct *work)
struct tcindex_filter_result *res;
struct tcindex_filter *f;
+ kfree(work);
+
list_for_each_entry_safe(f, res, &work->list, list) {
list_del(&f->list);
kfree(f);
Conclusion
In conclusion, the memory leak vulnerability in tcindex_partial_destroy_work can lead to the exhaustion of system memory resources, potentially resulting in a denial-of-service (DoS) condition or other adverse effects. It is crucial to update the Linux Kernel to version v5.10.54 or later to mitigate this vulnerability. Users can also apply the provided patch or backport the fix as a temporary workaround. For further assistance or support in 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 the exhaustion of system memory resources. This can result in a denial-of-service (DoS) condition or other adverse effects on system performance.
Users can check their Linux Kernel version to determine if they are using a vulnerable version. If the kernel version is earlier than v5.10.54, the system is potentially affected.
There are no known instances of this vulnerability being exploited in the wild. However, it is important to apply the fix to prevent any potential exploitation.
While updating the kernel is the recommended solution, users can apply the provided patch or backport the fix to their current kernel version as a temporary mitigation measure.
For more details about this vulnerability, including the commit that fixed it, you can refer to the vulnerability database entry: https://github.com/cloudsecurityalliance/gsd-database/blob/main/2021/1001xxx/GSD-2021-1001242.json
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.