Bug 481553 (CVE-2008-5987) - CVE-2008-5987 eog: untrusted python modules search path
Summary: CVE-2008-5987 eog: untrusted python modules search path
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2008-5987
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL: http://bugs.debian.org/cgi-bin/bugrep...
Whiteboard:
Depends On: CVE-2008-5983
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-26 10:40 UTC by Jan Lieskovsky
Modified: 2021-02-25 13:39 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-08-22 16:02:12 UTC
Embargoed:


Attachments (Terms of Use)

Description Jan Lieskovsky 2009-01-26 10:40:31 UTC
Untrusted search path vulnerability in eog's Python module allows local
users to execute arbitrary code via a Trojan horse Python file in the
current working directory, related to an erroneous setting of sys.path
by the PySys_SetArgv function.

References:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504352#4

Test case and more details about this issue (reason's why it can't be 
fixed in Python) are at:
http://www.nabble.com/Bug-484305%3A-bicyclerepair%3A-bike.vim-imports-untrusted-python-files-from-cwd-td18848099.html

Debian patch:
http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=02_sanitize_sys.path.patch;att=1;bug=504352

Comment 1 Jan Lieskovsky 2009-01-26 10:43:06 UTC
This issue does NOT affect the versions of the eog package, as shipped
with Red Hat Enterprise Linux 3, 4, and 5.

This issue affects the versions of the eog package, as shipped 
with Fedora releases of 9, 10 and devel.

Please fix.

Comment 2 Jan Lieskovsky 2009-01-26 18:29:04 UTC
Affected file:

src/eog-python-module.c:        PySys_SetArgv (1, argv);

Comment 3 Tomas Hoger 2009-01-27 16:14:30 UTC
This should not be an issue for Fedora packages either, as they do not seem to be built with python support.  According to the build logs, affected file is not compiled at all.

$ curl -s http://kojipkgs.fedoraproject.org/packages/eog/2.24.3.1/1.fc10/data/logs/i386/build.log | grep --color 'Python support' 
checking whether Python support is requested... 
	Python support .............:  no

Similar for latest F11 build.

Comment 4 Jan Lieskovsky 2009-01-28 10:31:07 UTC
Common Vulnerabilities and Exposures assigned an identifier CVE-2008-5987 to
this vulnerability:

Untrusted search path vulnerability in the Python interface in eog
2.22.3, and possibly other versions, allows local users to execute
arbitrary code via a Trojan horse Python file in the current working
directory, related to a vulnerability in the PySys_SetArgv function
(CVE-2008-5983).

References:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5987
http://www.openwall.com/lists/oss-security/2009/01/26/2
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504352
https://bugzilla.redhat.com/show_bug.cgi?id=481553

Comment 5 Jan Lieskovsky 2009-01-29 11:28:54 UTC
More explanation why this issue wasn't fixed in Python yet, can be
found here:

https://bugzilla.redhat.com/show_bug.cgi?id=482814#c1

here:

https://bugzilla.redhat.com/show_bug.cgi?id=482814#c4

and here:

https://bugzilla.redhat.com/show_bug.cgi?id=482814#c5

Looks like the Python fix won't come anytime soon, so please
fix the issue in the package, till we find the proper Python solution.

Ray Strode's test case to check the work of the fix can be found here:

https://bugzilla.redhat.com/show_bug.cgi?id=481556#c8

Comment 6 Josh Bressers 2010-05-19 17:28:46 UTC
Statement:

This issue does not affect the versions of the eog package, as shipped with Red Hat Enterprise Linux 3, 4, and 5.


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