RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1552328 - security issue: reposync follows remotely-provided relative paths including ../
Summary: security issue: reposync follows remotely-provided relative paths including ../
Keywords:
Status: CLOSED DUPLICATE of bug 1600221
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum-utils
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Michal Domonkos
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
: 1594659 (view as bug list)
Depends On:
Blocks: 1549618 1598068
TreeView+ depends on / blocked
 
Reported: 2018-03-06 23:06 UTC by elfchief-redhatbugs
Modified: 2018-08-08 06:52 UTC (History)
6 users (show)

Fixed In Version: yum-utils-1.1.31-47.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1598068 (view as bug list)
Environment:
Last Closed: 2018-07-20 08:05:59 UTC
Target Upstream Version:
Embargoed:
sgayou: needinfo-


Attachments (Terms of Use)

Description elfchief-redhatbugs 2018-03-06 23:06:25 UTC
Description of problem:

When syncing a repository, reposync will download files and name them as specified by the remote primary.xml, even if that path includes ../, allowing a remote repository owner to write arbitrary files to arbitrary locations on the host running reposync, with the permissions of the user running reposync.


Version-Release number of selected component (if applicable): yum-utils-1.1.31-42.el7.noarch


How reproducible: Reliably


Steps to Reproduce:
1.   mkdir -p /tmp/one/two/three; cd /tmp/one/two/three
2.   Create google-cloud-sdk.repo , containing:
[google-cloud-sdk]
name=Google Cloud SDK
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el7-x86_64
enabled=1
gpgcheck=0
3.   reposync -c google-cloud-sdk.repo -a x86_64 -r google-cloud-sdk


Actual results:

Packages are deposited into /tmp/one/two/pool , or into /tmp/one/pool if --norepopath is specified, locations and names which are derived from the remotely provided repository metadata.


Expected results:

Packages should be deposited into a subdirectory of /tmp/one/two/three, or an error should be thrown


Additional info:

Since many sites (unwisely) run mirroring-type operations as administrative users, this could potentially be a pretty serious security issue.

Comment 12 Scott Gayou 2018-07-12 16:00:11 UTC
CVE-2018-10897 was assigned to this.

Comment 24 Karel Srot 2018-08-08 06:52:06 UTC
*** Bug 1594659 has been marked as a duplicate of this bug. ***


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