netfilter: nf_tables: unregister flowtable hooks on netns exit
Summary
GSD-2022-1000742: netfilter: nf_tables: unregister flowtable hooks on netns exit. Affects Kernel versions >= ff4bf2f42a40e7dff28379f085b64df322c70b45, < b4fcc081e527aa2ce12e956912fc47e251f6bd27. 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 a fundamental component of the Linux operating system. It provides the core functionality and interfaces for the system's hardware and software components. The netfilter subsystem within the Kernel is responsible for packet filtering, network address translation, and other network-related operations. Within netfilter, nf_tables is a framework for configuring firewall rules and network traffic processing. This vulnerability specifically affects the nf_tables component.
Vulnerability Detail
The vulnerability in nf_tables involves the failure to unregister flowtable hooks upon network namespace (netns) exit. This oversight can lead to a use-after-free scenario, where a reference to the flowtable hooks is retained even after the network namespace is destroyed. An attacker with sufficient privileges within the affected network namespace could exploit this vulnerability to execute arbitrary code or escalate their privileges. The vulnerability was introduced in Linux Kernel version 5.5 and has been fixed in version 5.16.12.
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 avoid the vulnerability by not utilizing the nf_tables component or by restricting access to the affected network namespace. However, these workarounds may limit the functionality or usability of the system.
Conclusion
The netfilter nf_tables vulnerability, which allows for a use-after-free scenario upon netns exit, has been identified and fixed in Linux Kernel version 5.16.12. To ensure the security of your system, it is recommended to update the Kernel to this version or a later one. For further support or assistance with vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The vulnerability allows an attacker with sufficient privileges within the affected network namespace to execute arbitrary code or escalate their privileges.
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 playground will analyze it for any open-source vulnerabilities, including this one.
Yes, the vulnerability has been fixed in Linux Kernel version 5.16.12. It is recommended to update to this version or a later one to mitigate the risk.
While updating the Kernel is the recommended solution, you can apply a workaround by avoiding the use of nf_tables or restricting access to the affected network namespace. However, these measures may have limitations and it is still advisable to update the Kernel as soon as possible.
There are no known instances of this vulnerability being exploited in the wild. However, it is important to promptly update the Kernel to prevent potential exploitation.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.