Bug 1348410 - Audit for arbitrary code execution vulnerabilities due to insecure loading of Python module(s) from CWD
Summary: Audit for arbitrary code execution vulnerabilities due to insecure loading of...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: distribution
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Václav Pavlín
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1347124 1347130 1347177 1347180 1348455 1348460 1348463 1348469 1348470 1348473 1348474 1348480 1348505 1348507 1348514
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-21 06:45 UTC by Dhiru Kholia
Modified: 2020-10-31 21:34 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dhiru Kholia 2016-06-21 06:45:44 UTC

Comment 1 Dhiru Kholia 2016-06-21 06:48:44 UTC
This audit is motivated by https://bugzilla.redhat.com/show_bug.cgi?id=995060

Comment 2 Fedora End Of Life 2016-11-25 09:20:57 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. 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 '23'.

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 23 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 3 Rex Dieter 2017-02-16 18:12:47 UTC
So any general suggestions or advice on how to rectify this issue (in tracked packages)?

(It almost seems like something that could be better fixed in python itself)

Comment 4 Fedora End Of Life 2017-11-16 18:34:02 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 5 Dhiru Kholia 2017-12-12 13:02:53 UTC
> So any general suggestions or advice on how to rectify this issue (in tracked packages)?

I missed your message earlier. I don't have any general tips at the moment.

Comment 6 Dhiru Kholia 2017-12-12 14:19:46 UTC
Something like https://wiki.gentoo.org/wiki/Project:Perl/Dot-In-INC-Removal would be nice.

Comment 7 Miro Hrončok 2017-12-12 14:40:59 UTC
For Python 3, using the -I flag in shebang does the trick:

$ cat > foo.py
print('boom!')

$ cat > script
#!/usr/bin/python3
import foo
print('imported')

$ chmod +x script

$ ./script 
boom!
imported

$ sed -i 's/python3/python3 -I/' script 

$ cat ./script 
#!/usr/bin/python3 -I
import foo
print('imported')

$ ./script 
Traceback (most recent call last):
  File "./script", line 2, in <module>
    import foo
ModuleNotFoundError: No module named 'foo'

Comment 8 Kevin Fenzi 2020-10-31 19:17:45 UTC
There seems to be 1 bug left blocking this... in initial-setup? Perhaps someone could fix that and we can close this out?

Comment 9 Miro Hrončok 2020-10-31 21:34:32 UTC
Note that


a) 8 of the bugs were closed as EOL. So in fact, likely never actually fixed.

b) The last remaining open bug is for RHEL 7, so likely not going to be fixed either.


I propose we close this tracker as WONTFIX, unless somebody actually wants to drive this.


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