Bug 1496344 (CVE-2017-14867)

Summary: CVE-2017-14867 git: cvsserver command injection
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: aileenc, alazarot, amahdal, anstephe, besser82, ccoleman, c.david86, chazlett, chrisw, dedgar, dmcphers, drusso, etirelli, gvarsami, hhorak, ibek, jbowes, jcoleman, jgoulding, jmadigan, jolee, jorton, jshepherd, kconner, kpiwko, kverlaen, ldimaggi, lgriffin, ngough, nwallace, paradhya, pbraun, pstodulk, pwright, rrajasek, rsynek, rwagner, rzhang, sdaley, tcunning, tkirby, tmz, vhalbert
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: git 2.10.5, git 2.11.4, git 2.12.5, git 2.13.6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-20 21:16:35 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: 1496345    
Bug Blocks: 1496346    
Attachments:
Description Flags
git 2.10.4 to 2.10.5 diff none

Description Andrej Nemec 2017-09-27 06:52:14 UTC
The `git` subcommand `cvsserver` is a Perl script which makes excessive use of the backtick operator to invoke `git`. User input is used within some of those invocations. This potentially allows a local attacker to execute arbitrary code.

It should be noted, that `git-cvsserver` will be invoked by `git-shell` by default without further configuration.

References:

http://seclists.org/oss-sec/2017/q3/534
https://public-inbox.org/git/xmqqy3p29ekj.fsf@gitster.mtv.corp.google.com/

Comment 1 Andrej Nemec 2017-09-27 06:53:08 UTC
Created git tracking bugs for this issue:

Affects: openshift-1 [bug 1496345]

Comment 2 Todd Zullinger 2017-09-27 15:53:34 UTC
For systems to be vulnerable to the attack documented in http://seclists.org/oss-sec/2017/q3/att-534/git_cvsserver.txt the git-cvs package must be installed.  Most modern git servers will not need git-cvs and could remove it to mitigate the vulnerability.

Comment 3 Todd Zullinger 2017-09-28 15:38:07 UTC
This issue has now been assigned CVE-2017-14867, as noted in http://seclists.org/oss-sec/2017/q3/568.

Comment 4 Stefan Cornelius 2017-10-05 09:47:37 UTC
Created attachment 1334729 [details]
git 2.10.4 to 2.10.5 diff

Diff of 2.10.4 to 2.10.5. Linking individual commits is a bit messy in this case, so this seems to be the next best option.

Comment 6 Stefan Cornelius 2017-10-05 11:15:45 UTC
Mitigation:

In case you do not rely on the commands offered by the "-cvs" subpackage (for example "git cvsserver" or "git cvsimport") on RHEL or RHSCL, you can uninstall the git "-cvs" subpackage.

Comment 8 Product Security DevOps Team 2020-05-20 21:16:35 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2017-14867