-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Portmap: append, rather than prepend, entry rules - CVE-2019-9946 #269
Conversation
75e49fb
to
29f9ba5
Compare
I'll try this out with Calico |
This means that portmapped connections can be more easily controlled / firewalled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/lgtm |
(Seems to work with Calico) |
This issue was coordinated with the CNI team as it caused a potential security issue with Kubernetes. See the details below. A security issue was discovered with interactions between the CNI (Container Networking Interface) portmap plugin versions prior to 0.7.5 and Kubernetes. The CNI portmap plugin is embedded into Kubernetes releases so new releases of Kubernetes are required to fix this issue. The issue is Medium and upgrading to Kubernetes 1.11.9, 1.12.7, 1.13.5, and 1.14.0 is encouraged to fix this issue if this plugin is used in your environment. Am I vulnerable? As this affects a Kubernetes plugin interface it is difficult to say with certainty without a complete understanding of your Kubernetes configuration. The issue was identified in a configuration of kube-proxy in IPVS mode along with a pod using a HostPort. However, other network configurations may use the CNI portmap plugin as well. Run How do I upgrade? Follow your management tool or vendor instructions to upgrade to the latest release of Kubernetes. Vulnerability Details Before this fix the 'portmap' plugin, used to setup HostPorts for CNI, would insert rules at the front of the iptables nat chains; which would take precedence over the KUBE- SERVICES chain. Because of this, the HostPort/portmap rule could match incoming traffic even if there were better fitting, more specific service definition rules like NodePorts later in the chain. Switching the portmap plugin to append its rules, rather than prepend, allows traffic to be processed by KUBE-SERVICES rules first. Only if traffic does not match a service will it be considered for HostPorts. This is compatible with the behavior of the legacy ‘kubenet’ network driver. See the GitHub issue for details. kubernetes/kubernetes#75455 and #269 Thank you Thank you to Etienne Champetier of Anevia for identifying the issue, Tim Hockin, Dan Williams, Casey Callendrello, Dujun, Tim Pepper, and the patch release managers for the coordination is making this release. Thank You, Brandon on behalf of the Kubernetes Product Security Committee |
I have identified 2 specific variants of this CVE, all covered by the same fix.
|
Upgrade cni-plugin to latest version, since portmap has a bug. containernetworking/plugins#269
This means that portmapped connections can be more easily controlled / firewalled.