Bug 1498870 (CVE-2017-15041)

Summary: CVE-2017-15041 golang: arbitrary code execution during "go get" or "go get -d"
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
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, apevec, bleanhar, ccoleman, chrisw, dedgar, dmcphers, jcajka, jgoulding, jjoyce, jkeck, jokerman, jschluet, kbasil, lemenkov, lhh, lpeer, markmc, mburns, mchappel, rbryant, renich, sclewis, slinaber, s, tdecacqu, ttomecek, vbatts
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: golang 1.8.4, golang 1.9.1 Doc Type: If docs needed, set a value
Doc Text:
An arbitrary command execution flaw was found in the way Go's "go get" command handled the checkout of source code repositories. A remote attacker capable of hosting malicious repositories could potentially use this flaw to cause arbitrary command execution on the client side.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 03:26:34 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: 1498872, 1498873, 1499160, 1500591, 1565783    
Bug Blocks: 1498774, 1498876    

Description Adam Mariš 2017-10-05 13:08:36 UTC
Using custom domains, it is possible to arrange things so that example.com/pkg1 points to a Subversion repository but example.com/pkg1/pkg2 points to a Git repository. If the Subversion repository includes a Git checkout in its pkg2 directory and some other work is done to ensure the proper ordering of operations, “go get” can be tricked into reusing this Git checkout for the fetch of code from pkg2. If the Subversion repository’s Git checkout has a malicious code in .git/hooks/, it will execute on the system running “go get.”

Upstream bug:

https://github.com/golang/go/issues/22125

Upstream patches:

Go 1.8: https://go-review.googlesource.com/c/go/+/68190
Go 1.9: https://go-review.googlesource.com/c/go/+/68022

Comment 1 Adam Mariš 2017-10-05 13:09:50 UTC
Created golang tracking bugs for this issue:

Affects: epel-6 [bug 1498872]
Affects: fedora-all [bug 1498873]

Comment 2 Joshua Padman 2017-10-06 00:10:03 UTC
github issue was updated to include CVE-2017-15041

Comment 4 errata-xmlrpc 2017-12-14 11:36:29 UTC
This issue has been addressed in the following products:

  Red Hat Developer Tools

Via RHSA-2017:3463 https://access.redhat.com/errata/RHSA-2017:3463

Comment 6 errata-xmlrpc 2018-04-10 08:27:31 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2018:0878 https://access.redhat.com/errata/RHSA-2018:0878