Bug 1692712 (CVE-2019-9946)

Summary: CVE-2019-9946 kubernetes: Incorrect rule injection in CNI portmap plugin
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: admiller, ahardin, amurdaca, bleanhar, bmontgom, ccoleman, dbaker, dcbw, dedgar, eparis, go-sig, hchiramm, ichavero, jbrooks, jburrell, jcajka, jchaloup, jgoulding, jmulligan, jnovy, jokerman, kramdoss, lsm5, madam, mchappel, nstielau, rhs-bugs, security-response-team, sisharma, sponnaga, strigazi, tdawson, tstclair
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kubernetes 1.11.9, kubernetes 1.12.7, kubernetes 1.13.5, kubernetes 1.14.0, containernetworking-plugins 0.7.5 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-27 03:27:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1694241, 1694242, 1694243, 1694244, 1694257, 1694258, 1694259, 1694260, 1715371, 1715389, 1715390, 1715402, 1715758    
Bug Blocks: 1692721    

Description Andrej Nemec 2019-03-26 09:46:08 UTC
It was found that 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.

Upstream issue:

https://github.com/containernetworking/plugins/pull/269

Upstream patch:

https://github.com/containernetworking/plugins/pull/269/commits/f8fcb3525fc5c4a2bdc1a791b5c7b46a29ef4f04

Comment 10 Laura Pardo 2019-03-29 21:07:13 UTC
Created kubernetes tracking bugs for this issue:

Affects: fedora-all [bug 1694243]


Created kubernetes:1.1/kubernetes tracking bugs for this issue:

Affects: fedora-29 [bug 1694241]


Created kubernetes:openshift-3.10/origin tracking bugs for this issue:

Affects: fedora-29 [bug 1694242]


Created origin tracking bugs for this issue:

Affects: fedora-all [bug 1694244]

Comment 12 Dave Baker 2019-04-01 17:39:58 UTC
Thanks for dcbw I was able to actually confirm OCP is *NOT* affected by this.

The vulnerable code is pulled into the vendor/ section of the source tree, but this plugin is not being compiled or shipped.

Comment 13 Dave Baker 2019-04-01 18:03:10 UTC
Statement:

While this issue affects the CNI portmap plugin that is bundled with Kubernetes, it does not affect OpenShift Container Platform as the vulnerable plugin is not included.

It also does not affect the version of Kubernetes (embedded in heketi) shipped with Red Hat Gluster Storage 3 as it does not contain the vulnerable code.

Comment 17 Riccardo Schirone 2019-05-30 08:28:14 UTC
Created containernetworking-cni tracking bugs for this issue:

Affects: epel-7 [bug 1715371]

Comment 21 Riccardo Schirone 2019-05-31 07:44:06 UTC
Created containernetworking-plugins tracking bugs for this issue:

Affects: fedora-all [bug 1715758]