Bug 1348460

Summary: Arbitrary code execution due to insecure loading of Python module(s) from CWD
Product: [Fedora] Fedora Reporter: Dhiru Kholia <dkholia>
Component: guakeAssignee: Pierre-YvesChibon <pingou>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: mhroncok, oliver, pingou
Target Milestone: ---Keywords: Reopened
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: 2018-11-30 22:09:36 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-21 08:37:01 UTC
The /usr/bin/guake script from the guake package tries to load the "guake" Python module from the current working directory (CWD). /usr/bin/guake-prefs script is similarly affected.

Steps to Reproduce:

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

$ guake  # run /usr/bin/guake
boom!
...


Additional info:

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

Comment 1 Fedora Update System 2016-08-29 09:06:41 UTC
guake-0.8.7-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-9600935914

Comment 2 Fedora Update System 2016-08-29 09:07:06 UTC
guake-0.8.7-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-32896dd0a5

Comment 3 Fedora Update System 2016-08-29 09:07:23 UTC
guake-0.8.7-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-904d016ed5

Comment 4 Fedora Update System 2016-08-29 09:07:44 UTC
guake-0.8.7-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-5ea1656d71

Comment 5 Fedora Update System 2016-08-29 22:21:49 UTC
guake-0.8.7-1.el7 has been pushed to the Fedora EPEL 7 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-EPEL-2016-904d016ed5

Comment 6 Fedora Update System 2016-08-29 22:52:50 UTC
guake-0.8.7-1.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-32896dd0a5

Comment 7 Fedora Update System 2016-08-29 22:53:10 UTC
guake-0.8.7-1.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-9600935914

Comment 8 Fedora Update System 2016-08-29 22:56:23 UTC
guake-0.8.7-1.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-5ea1656d71

Comment 9 Fedora Update System 2016-09-10 20:55:22 UTC
guake-0.8.7-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2016-09-13 18:10:48 UTC
guake-0.8.7-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2016-09-13 21:20:58 UTC
guake-0.8.7-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2016-09-14 01:20:16 UTC
guake-0.8.7-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Miro Hrončok 2017-07-26 09:59:16 UTC
I was curious how was this fixed and could not find anything relevant in the update that closed this. And indeed, it was not fixed:

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

$ guake
boom!
/usr/bin/python2: No module named guake.main

$ rpm -q guake
guake-0.8.8-2.fc26.noarch

Comment 14 Miro Hrončok 2017-07-26 09:59:55 UTC
Changing to Fedora 25, but it is relevant to all Fedoras.

Comment 15 Fedora End Of Life 2017-11-16 18:30:53 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 16 Miro Hrončok 2017-11-18 15:08:29 UTC
[~]$ cat > guake.py
print("boom!")


[~]$ guake
boom!
/usr/bin/python2: No module named guake.main


[~]$ rpm -q guake
guake-0.8.8-3.fc27.noarch

Comment 17 Pierre-YvesChibon 2018-07-10 09:14:15 UTC
Should this be reported upstream? I'm not sure this is a packaging issue.

Would you like me to report it?

Comment 18 Miro Hrončok 2018-07-10 09:58:59 UTC
me or Dhiru?

I don't really care.

Comment 19 Ben Cotton 2018-11-27 15:01:10 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 20 Ben Cotton 2018-11-30 22:09:36 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.