tipc: Wait and Exit Until All Work Queues are Done
Summary
GSD-2021-1000555: tipc: wait and exit until all work queues are done. Affects Kernel versions >= d0f91938bede204a343473792529e0db7d599836, < b9f5b7ad4ac3af006443f535b1ce7bff1d130d7d. 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 package is an essential component of the Linux operating system. It provides the core functionality and interfaces for the system's hardware, software, and processes. The Transmission Control Protocol (TCP) Implementation in the Linux Kernel (TIPC) is a communication protocol used for inter-process communication between nodes in a cluster. TIPC relies on work queues to handle various tasks and operations within the system.
Vulnerability Detail
The vulnerability identified as GSD-2021-1000555 in the TIPC implementation of the Kernel package allows an attacker to potentially exploit a race condition. This race condition occurs when a process exits before all work queues have completed their tasks. By exploiting this vulnerability, an attacker could cause a denial-of-service (DoS) condition or potentially execute arbitrary code with elevated privileges. The vulnerability was introduced in version v4.1 of the Linux Kernel and has been fixed in version v5.12.9.
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
If updating the Linux Kernel package is not immediately feasible, a possible workaround is to modify the affected code to explicitly wait for all work queues to complete before allowing a process to exit. Here is an example of how this can be achieved:
// Wait for all work queues to complete
while (!workqueue_empty(&my_workqueue)) {
msleep(100);
}
// Allow process to exit
exit(0);
Conclusion
The vulnerability in the TIPC implementation of the Kernel package allows for a potential race condition that can result in a denial-of-service (DoS) or arbitrary code execution. It is crucial to update the Linux Kernel package to version v5.12.9 or later to mitigate this vulnerability. If immediate update is not possible, applying the provided workaround can help mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
This vulnerability can potentially lead to a denial-of-service (DoS) condition or allow an attacker to execute arbitrary code with elevated privileges.
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 for any open-source vulnerabilities, including GSD-2021-1000555.
Yes, a patch has been released in version v5.12.9 of the Linux Kernel. It is recommended to update to this version or later to fix the vulnerability.
Yes, if updating the Linux Kernel package is not immediately feasible, you can modify the affected code to explicitly wait for all work queues to complete before allowing a process to exit. Refer to the 'workaround' section for more details.
You can find more information about this vulnerability, including the commit details and references, in the Open Source Vulnerability database entry at https://github.com/cloudsecurityalliance/gsd-database/blob/main/2021/1000xxx/GSD-2021-1000555.json.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.