Bug 1636619 (CVE-2018-17456) - CVE-2018-17456 git: arbitrary code execution via .gitmodules
Summary: CVE-2018-17456 git: arbitrary code execution via .gitmodules
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2018-17456
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1636620 1636621 1636622 1638265 1638266 1638269 1638270 1638271 1638275 1785230
Blocks: 1636623
TreeView+ depends on / blocked
 
Reported: 2018-10-05 21:44 UTC by Laura Pardo
Modified: 2023-09-07 19:26 UTC (History)
37 users (show)

Fixed In Version: git 2.14.5, git 2.15.3, git 2.16.5, git 2.17.2, git 2.18.1, git 2.19.1
Doc Type: If docs needed, set a value
Doc Text:
An option injection flaw has been discovered in git when it recursively clones a repository with sub-modules. A remote attacker may configure a malicious repository and trick a user into recursively cloning it, thus executing arbitrary commands on the victim's machine.
Clone Of:
Environment:
Last Closed: 2019-06-10 10:39:25 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:3408 0 None None None 2018-10-30 16:58:57 UTC
Red Hat Product Errata RHSA-2018:3541 0 None None None 2018-11-12 11:23:31 UTC
Red Hat Product Errata RHSA-2020:0316 0 None None None 2020-02-03 09:10:56 UTC

Description Laura Pardo 2018-10-05 21:44:24 UTC
A flaw was found in git which allows an attacker to execute arbitrary code by crafting a malicious .gitmodules file in a project cloned with --recurse-submodules.


References:
https://bugzilla.novell.com/show_bug.cgi?id=1110949
https://groups.google.com/forum/#!topic/git-packagers/fNLXf6LQC08

Comment 1 Laura Pardo 2018-10-05 21:44:54 UTC
Created git tracking bugs for this issue:

Affects: fedora-all [bug 1636620]


Created libgit2 tracking bugs for this issue:

Affects: fedora-all [bug 1636621]

Comment 5 Jason Shepherd 2018-10-08 06:15:58 UTC
Statement:

OpenShift Container Platform (OCP) source-to-image uses the git client packaged with the OCP container images. Since RHEL7 and its associated images are impacted, source-to-image is also impacted. The atomic-openshift package running on the masters controls the code that determines the source-to-image build image in use, therefore a cluster update is required to patch this issue. Full instructions will be provided in Security Errata provided for this issue.

In OCP 3.6 and earlier, source-to-image executes in a privileged container on the node. Therefore the severity of this CVE is important for these versions. OCP 3.7 and later execute source-to-image git pulls in an unprivileged init container.

Comment 9 Riccardo Schirone 2018-10-10 09:13:24 UTC
git does not properly pass the `url` and `path` fields of a submodule to the git-clone command, when recursively cloning a repository with git sub-modules. If the `url` field begins with a `-`(dash) this is going to be interpreted as an option.

Comment 17 errata-xmlrpc 2018-10-30 16:58:39 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 18 errata-xmlrpc 2018-11-12 11:23:11 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS

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

Comment 30 errata-xmlrpc 2020-02-03 09:10:51 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6

Via RHSA-2020:0316 https://access.redhat.com/errata/RHSA-2020:0316


Note You need to log in before you can comment on or make changes to this bug.