Bug 1347124

Summary: Arbitrary code execution due to insecure loading of Python module(s) from CWD
Product: [Fedora] Fedora Reporter: Dhiru Kholia <dkholia>
Component: python-inotifyAssignee: Terje Røsten <terje.rosten>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: jfilak, steve.traylen, terje.rosten
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-inotify-0.9.6-6.fc25 python-inotify-0.9.6-6.fc24 python-inotify-0.9.6-6.fc23 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-27 00:34:52 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 06:23:31 UTC
Description of problem:

The pyinotify utility from the python-inotify package tries to load the "pyinotify" Python module from the current working directory (CWD).

$ cat /usr/bin/pyinotify 
#! /bin/bash
#

python -m pyinotify "$@"

Steps to Reproduce:

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

$ pyinotify  # invoke /usr/bin/pyinotify script
boom!

Additional info:

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

python3-inotify package is similarly affected.

Comment 1 Fedora Update System 2016-09-20 17:58:05 UTC
python-inotify-0.9.6-6.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e22ecc14a6

Comment 2 Fedora Update System 2016-09-20 17:58:13 UTC
python-inotify-0.9.6-6.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-1d45339c16

Comment 3 Fedora Update System 2016-09-20 17:58:17 UTC
python-inotify-0.9.6-6.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e4f2aead7d

Comment 4 Fedora Update System 2016-09-22 01:24:09 UTC
python-inotify-0.9.6-6.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-1d45339c16

Comment 5 Fedora Update System 2016-09-22 01:25:02 UTC
python-inotify-0.9.6-6.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-e22ecc14a6

Comment 6 Fedora Update System 2016-09-22 09:56:54 UTC
python-inotify-0.9.6-6.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-e4f2aead7d

Comment 7 Fedora Update System 2016-09-27 00:34:52 UTC
python-inotify-0.9.6-6.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2016-09-28 01:56:14 UTC
python-inotify-0.9.6-6.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2016-10-03 06:20:31 UTC
python-inotify-0.9.6-6.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.