Memory Leak in tcp_bpf_sendmsg in Kernel
Summary
GSD-2022-1002241: bpf, sockmap: Fix memleak in tcp_bpf_sendmsg while sk msg is full. Affects Kernel versions >= 604326b41a6fb9b4a78b6179335decee0365cd8c, < 6d03722c34d9603df325f67c6d30dc1b7b3c6067. 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 crucial component of the Linux operating system that provides core functionalities and acts as an interface between hardware and software. It manages system resources, facilitates communication between processes, and handles various system operations. The tcp_bpf_sendmsg function is responsible for sending messages over TCP sockets using Berkeley Packet Filter (BPF) programs. BPF allows users to define custom packet filtering and manipulation logic. However, a memory leak vulnerability exists in tcp_bpf_sendmsg when the socket message (sk msg) is full.
Vulnerability Detail
The memory leak vulnerability in tcp_bpf_sendmsg occurs when the sk msg is full, leading to a continuous allocation of memory without proper deallocation. This can result in memory exhaustion, impacting system performance and stability. An attacker could potentially exploit this vulnerability to cause a denial-of-service (DoS) condition by repeatedly triggering the memory leak. The vulnerability was introduced in version v4.20 of the Linux Kernel and has been fixed in version v5.4.189.
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 temporary workaround, users can limit the impact of the vulnerability by monitoring the memory usage of the affected system and taking appropriate measures to prevent memory exhaustion. This can include implementing resource limits, optimizing memory usage in applications, or restarting affected services periodically to release accumulated memory.
Conclusion
In conclusion, the memory leak vulnerability in tcp_bpf_sendmsg can lead to memory exhaustion and potential denial-of-service (DoS) conditions. It is crucial to update the Linux Kernel to version v5.4.189 or later to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The vulnerability can lead to memory exhaustion, affecting system performance and stability. It can also be exploited by an attacker to cause a denial-of-service (DoS) condition.
You can use the Vulert Playground (https://vulert.com/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 this one.
Yes, the vulnerability has been fixed in Linux Kernel version v5.4.189. It is recommended to update to this version or a later one to mitigate the risk.
No, this vulnerability does not have a remote exploitation vector. An attacker would need local access to the system to exploit the memory leak.
There are no known instances of this vulnerability being actively exploited in the wild. However, it is still important to apply the necessary patches and updates to ensure system security.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.