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.

Bug 1347180

Summary: Arbitrary code execution due to insecure loading of Python module(s) from CWD
Product: Red Hat Enterprise Linux 7 Reporter: Dhiru Kholia <dkholia>
Component: initial-setupAssignee: Martin Kolman <mkolman>
Status: CLOSED WONTFIX QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-15 07:42:12 UTC Type: Bug
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:    
Bug Blocks: 1348410    

Description Dhiru Kholia 2016-06-16 09:11:11 UTC
Description of problem:

The /usr/bin/initial-setup script from the initial-setup package tries to load the "initial_setup" Python module from the current working directory (CWD).

Steps to Reproduce:

$ cat > initial_setup.py
print("boom!")

$ initial-setup  # run /usr/bin/initial-setup
...
boom!


Additional info:

This bug is similar to https://bugzilla.redhat.com/show_bug.cgi?id=995060

Comment 2 Martin Kolman 2016-06-16 12:46:01 UTC
I'll note that after 7.2 GA the Initial Setup executables have been moved - they are no longer in PATH and are located in /usr/libexec/:

/usr/libexec/initial-setup/firstboot-windowmanager
/usr/libexec/initial-setup/initial-setup-text
/usr/libexec/initial-setup/reconfiguration-mode-enabled
/usr/libexec/initial-setup/run-initial-setup
/usr/libexec/initial-setup/text-service-is-deprecated

Comment 4 RHEL Program Management 2020-12-15 07:42:12 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.