Vulnerability in Kernel: sctp: use call_rcu to free endpoint
Summary
GSD-2022-1000039: sctp: use call_rcu to free endpoint. Affects Kernel versions >= d25adbeb0cdb860fb39e09cdd025e9cfc954c5ab, < 769d14abd35e0e153b5149c3e1e989a9d719e3ff. 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 interfaces between hardware and software. It manages system resources, facilitates communication between processes, and ensures security and stability. The Stream Control Transmission Protocol (SCTP) is a transport layer protocol implemented in the Kernel, offering reliable, message-oriented communication. However, a vulnerability has been discovered in the Kernel's handling of SCTP endpoints, potentially leading to security issues.
Vulnerability Detail
The vulnerability arises from the lack of proper memory management when freeing SCTP endpoints in the Kernel. Without utilizing the call_rcu function, the endpoint's memory may not be safely released, leading to memory leaks or use-after-free vulnerabilities. Attackers could potentially exploit this vulnerability to execute arbitrary code, escalate privileges, or cause denial-of-service conditions. The vulnerability was introduced in Kernel version 4.14 and has been fixed in version 5.10.90.
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 manually apply the fix by modifying the affected code in the Kernel. The following code snippet demonstrates the necessary changes:
// Original code
void sctp_endpoint_free(struct sctp_endpoint *ep) {
// Freeing endpoint without call_rcu
kfree(ep);
}
// Modified code
void sctp_endpoint_free(struct sctp_endpoint *ep) {
// Freeing endpoint with call_rcu
call_rcu(&ep->rcu, kfree);
}
Conclusion
In conclusion, a vulnerability has been discovered in the Kernel's handling of SCTP endpoints, potentially leading to security issues. It is crucial to update the Kernel to version 5.10.90 or later to mitigate this vulnerability. Alternatively, users can apply the provided workaround by modifying the affected code. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
This vulnerability could allow attackers to execute arbitrary code, escalate privileges, or cause denial-of-service conditions by exploiting the memory management issue in SCTP endpoints.
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 to the playground, and it will provide real-time alerts for open-source vulnerabilities, including this one.
Yes, this vulnerability has been fixed in Kernel version 5.10.90. It is recommended to update to this version or a later one to ensure the security of your system.
Yes, a workaround is available by manually modifying the affected code in the Kernel. Please refer to the 'workaround' section for detailed instructions.
You can find more information about this vulnerability in the GSD-2022-1000039 entry of the GSD Database maintained by the Cloud Security Alliance. The link to the entry is provided in the 'affected' section of the vulnerability details.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.