Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Descriptionelfchief-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.