Bug 1564305 (CVE-2018-1002100)

Summary: CVE-2018-1002100 kubernetes: Kubectl copy doesn't check for paths outside of it's destination directory
Product: [Other] Security Response Reporter: Jason Shepherd <jshepherd>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: abhgupta, ahardin, bleanhar, bmontgom, ccoleman, dbaker, dedgar, dominik.mierzejewski, eparis, ichavero, jbrooks, jburrell, jcajka, jchaloup, jgoulding, jokerman, jshepherd, mchappel, nstielau, sponnaga, sthangav, trankin, tstclair, xxia, zhigwang
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Kubernetes 1.9.6 Doc Type: If docs needed, set a value
Doc Text:
An improper validation flaw exists in the kubernetes 'kubectl cp' command. An attacker, who could trick a user into using the command to copy files locally from a pod, could override files outside of the target directory of the command.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-21 19:59:26 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: 1564307, 1564337, 1567207, 1567208, 1577292, 1577293    
Bug Blocks: 1569667    

Description Jason Shepherd 2018-04-06 00:09:51 UTC
When using kubectl to cp files to a pod, if the container returns a malformed tarfile with paths like, '/some/remote/dir/../../../../tmp/foo' kubectl writes this to /tmp/foo instead of /some/local/dir/tmp/foo.

https://github.com/kubernetes/kubernetes/issues/61297

Comment 1 Jason Shepherd 2018-04-06 00:10:05 UTC
Acknowledgments:

Name: Michael Hanselmann (hansmi.ch)

Comment 2 Jason Shepherd 2018-04-06 00:10:44 UTC
Created kubernetes tracking bugs for this issue:

Affects: fedora-all [bug 1564307]

Comment 6 Cedric Buissart 2018-04-12 07:54:02 UTC
Statement:

Kubernetes support is moving from Red Hat Enterprise Linux to OpenShift Container Platform.  Kubernetes and its dependencies will no longer be updated through the Extras channel. Instead, the Red Hat customers are advised to use Red Hat's supported Kubernetes-based products such as Red Hat OpenShift Container Platform.

Comment 11 Zhigang Wang 2019-09-19 17:27:10 UTC
Hi,

Can we get a confirmation on the status of this CVE.
https://access.redhat.com/security/cve/cve-2018-1002100 state is "will not fix"

We have a customer is asking for the status of this CVE:

Problem Statement	CVE-2018-1002100 status for kubernetes
Description	
What problem/issue/behavior are you having trouble with?  What do you expect to see?

https://access.redhat.com/security/cve/cve-2018-1002100 states that the kubernetes package is affected (and won't be fixed) in OpenShift 3 without any mention of the minor version. Please confirm if the kubernetes package in 3.11 is affected or not and which version contains the fix, if any. If it's still affected, we'd like to request a fix backport.
Hide Section - TagsTags

Thanks.

Zhigang

Comment 12 Dave Baker 2019-09-23 20:16:29 UTC
The linked page https://access.redhat.com/security/cve/cve-2018-1002100 has been refreshed to clarify that OpenShift Container Platform 3.9 received a fix (RHBA-2018:1796), and that 3.10 and newer are not affected.

The "will not fix" comment is for the version of kubernetes that shipped in RHEL 7 Extras.