net: validate lwtstate->data before returning from skb_tunnel_info() in Kernel
Summary
GSD-2021-1001320: net: validate lwtstate->data before returning from skb_tunnel_info(). Affects Kernel versions >= 61adedf3e3f1d3f032c5a6a299978d91eff6d555, < 8aa13a86964cdec4fd969ef677c6614ff068641a. 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 manages system resources and provides an interface for applications to interact with the hardware. It is responsible for tasks such as process management, memory management, and device drivers. The vulnerability in question affects the Kernel's networking subsystem.
The skb_tunnel_info() function in the networking subsystem is responsible for extracting tunnel information from a socket buffer (skb) and populating a tunnel_info structure. This structure contains various fields related to network tunneling, such as the tunnel ID and tunnel key. The vulnerability arises from a lack of validation on the lwtstate->data field of the tunnel_info structure before returning from the skb_tunnel_info() function.
Vulnerability Detail
The vulnerability allows an attacker to exploit the lack of validation on the lwtstate->data field of the tunnel_info structure. By crafting a malicious skb with a specially crafted lwtstate->data field, an attacker can trigger a use-after-free vulnerability or potentially execute arbitrary code within the kernel context. This could lead to privilege escalation, denial of service, or other security breaches.
The vulnerability was introduced in version v4.3 of the Linux Kernel and has been fixed in version v5.4.135 by commit 8aa13a86964cdec4fd969ef677c6614ff068641a.
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 patches provided by the Kernel developers to address the vulnerability. These patches can be found in the Git repository mentioned above. It is important to note that workarounds may not provide a complete fix and updating to the latest stable version of the Kernel is the recommended solution.
Conclusion
The net: validate lwtstate->data before returning from skb_tunnel_info() vulnerability in the Kernel's networking subsystem can potentially allow an attacker to execute arbitrary code within the kernel context. It is crucial to update the Linux Kernel to version v5.4.135 or later to mitigate this vulnerability. Applying patches provided by the Kernel developers can serve as a temporary workaround. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The vulnerability can potentially allow an attacker to execute arbitrary code within the kernel context, leading to privilege escalation, denial of service, or other security breaches.
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 the Vulert Playground will analyze it for any open-source vulnerabilities, including this one.
At the time of this report, there is no known public exploit for this vulnerability. However, it is important to apply the recommended fixes and keep the Kernel up to date to mitigate any potential risks.
While updating the Kernel is the recommended solution, you can apply patches provided by the Kernel developers as a temporary mitigation. However, it is important to note that workarounds may not provide a complete fix and updating to the latest stable version of the Kernel is still advised.
You can find more information about this vulnerability in the GSD-2021-1001320.json file available in the GSD database (https://github.com/cloudsecurityalliance/gsd-database).
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.