Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1509868 - (CVE-2017-17458) CVE-2017-17458 mercurial: arbitrary command execution in mercurial repo with a git submodule
CVE-2017-17458 mercurial: arbitrary command execution in mercurial repo with ...
Status: CLOSED WONTFIX
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20171103,repor...
: Security
Depends On: 1509869
Blocks: 1509858
  Show dependency treegraph
 
Reported: 2017-11-06 04:06 EST by Cedric Buissart
Modified: 2018-02-12 03:59 EST (History)
5 users (show)

See Also:
Fixed In Version: mercurial 4.4.1
Doc Type: If docs needed, set a value
Doc Text:
It was found that mercurial was vulnerable to cross repositories modification. A specially crafted mercurial repository could trigger arbitrary commands on a client during commands such as clone or update.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-01-16 09:58:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Cedric Buissart 2017-11-06 04:06:52 EST
A vulnerability in Mercurial's handling of subrepositories was reported on the Mercurial Project's *public* bug tracker.

The vulnerability results in arbitrary code execution during `hg clone` or `hg pull` + `hg update` if a well-crafted repository is cloned or pulled from. The vulnerability is known to occur with Git subrepositories. But it can also possibly occur with other subrepository types. The vulnerability likely impacts Mercurial versions released for the past several years.
Comment 1 Cedric Buissart 2017-11-06 04:07:04 EST
External References:

https://bz.mercurial-scm.org/show_bug.cgi?id=5730
Comment 2 Cedric Buissart 2017-11-06 04:07:26 EST
Created mercurial tracking bugs for this issue:

Affects: fedora-all [bug 1509869]
Comment 4 Cedric Buissart 2018-01-16 09:43:08 EST
The fix consists of 2 distinct parts :
- prevents a mercurial sub-repository to cross another sub-repository
- disables sub-repositories by default.

Relevant patches :

 - tests: show symlink traversal across subrepo mount point (SEC)
https://www.mercurial-scm.org/repo/hg/rev/80d7dbda9294
 
 - subrepo: disallow symlink traversal across subrepo mount point (SEC)
https://www.mercurial-scm.org/repo/hg/rev/5e27afeddaee
 
 - subrepo: add config option to reject any subrepo operations (SEC)
https://www.mercurial-scm.org/repo/hg/rev/5e27afeddaee
 
 - subrepo: extend config option to disable subrepos by type (SEC)
https://www.mercurial-scm.org/repo/hg/rev/828cf35f1de6

 - subrepo: disable git and svn subrepos by default (BC) (SEC)
https://www.mercurial-scm.org/repo/hg/rev/846942fd6d15
Comment 5 Cedric Buissart 2018-01-16 09:51:20 EST
Statement:

This issue affects the versions of mercurial as shipped with Red Hat Enterprise Linux 7. Red Hat Product Security has rated this issue as having Moderate security impact. A future update may address this issue. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.
Comment 6 Cedric Buissart 2018-01-16 09:51:37 EST
Mitigation:

Disable sub-repositories

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