Bug 1089654 (CVE-2018-1002100) - VUL-0: CVE-2018-1002100: kubernetes: Kubectl copy doesn't check for paths outside of the destination directory
Summary: VUL-0: CVE-2018-1002100: kubernetes: Kubectl copy doesn't check for paths out...
Status: RESOLVED FIXED
Alias: CVE-2018-1002100
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Jordi Massaguer
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/203949/
Whiteboard: CVSSv3:RedHat:CVE-2018-1002100:6.1:(A...
Keywords: security
Depends on:
Blocks:
 
Reported: 2018-04-16 08:38 UTC by Johannes Segitz
Modified: 2018-07-18 09:12 UTC (History)
5 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
tentative patch for 1.8 (2.78 KB, patch)
2018-04-18 15:45 UTC, Jordi Massaguer
Details | Diff
patch for 1.9 (from upstream) (3.49 KB, patch)
2018-04-18 15:59 UTC, Jordi Massaguer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Segitz 2018-04-16 08:38:03 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.

SUSE:SLE-12-SP3:Update:Products:CASP20:Update affected. 

Reproduction is described in the test added in 
https://github.com/kubernetes/kubernetes/issues/61297

References:
https://bugzilla.redhat.com/show_bug.cgi?id=1564305
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2018-1002100
Comment 2 Jordi Massaguer 2018-04-18 15:45:47 UTC
Created attachment 767609 [details]
tentative patch for 1.8

I could not test it properly but we can build the package to test it.
Comment 3 Jordi Massaguer 2018-04-18 15:58:33 UTC
Unit tests on 1.8 patch were fine. Run as "make test WHAT=k8s.io/kubernetes/pkg/kubectl"
Comment 4 Jordi Massaguer 2018-04-18 15:59:56 UTC
Created attachment 767616 [details]
patch for 1.9 (from upstream)
Comment 5 Jordi Massaguer 2018-04-18 17:35:41 UTC
for kubernetes 1.9, this was fixed in version 1.9.5. See changelog in:

 https://github.com/kubernetes/kubernetes/compare/v1.9.5...release-1.9.

the commit is f180c96

kubernetes in Factory is now 1.9.6. No need to update.
Comment 6 Jordi Massaguer 2018-04-23 10:35:46 UTC
MR has been submitted for CaaSP 2.0:

https://build.suse.de/request/show/162601
Comment 11 Swamp Workflow Management 2018-07-17 19:10:16 UTC
SUSE-SU-2018:1982-1: An update that solves one vulnerability and has two fixes is now available.

Category: security (moderate)
Bug References: 1069469,1089654,1089991
CVE References: CVE-2018-1002100
Sources used:
SUSE CaaS Platform ALL (src):    kubernetes-1.8.10-3.3.1
Comment 12 Jordi Massaguer 2018-07-18 09:12:25 UTC
(In reply to Swamp Workflow Management from comment #11)
> SUSE-SU-2018:1982-1: An update that solves one vulnerability and has two
> fixes is now available.
> 
> Category: security (moderate)
> Bug References: 1069469,1089654,1089991
> CVE References: CVE-2018-1002100
> Sources used:
> SUSE CaaS Platform ALL (src):    kubernetes-1.8.10-3.3.1

Fix has been released. Closing.