Bug 481556 (CVE-2009-0314) - CVE-2009-0314 gedit: untrusted python modules search path
Summary: CVE-2009-0314 gedit: untrusted python modules search path
Status: CLOSED WONTFIX
Alias: CVE-2009-0314
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://www.nabble.com/Bug-484305%3A-b...
Whiteboard: public=20080806,reported=20081112,sou...
Keywords: Security
Depends On: CVE-2008-5983
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-26 11:16 UTC by Jan Lieskovsky
Modified: 2019-06-08 12:40 UTC (History)
4 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2015-02-17 15:35:37 UTC


Attachments (Terms of Use)
Test case. (67 bytes, text/plain)
2009-01-26 19:01 UTC, Ray Strode [halfline]
no flags Details
Change argument passed to PySys_SetArgv (543 bytes, patch)
2009-01-26 21:43 UTC, Ray Strode [halfline]
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
GNOME Bugzilla 569214 None None None 2019-02-26 13:29 UTC

Description Jan Lieskovsky 2009-01-26 11:16:49 UTC
Untrusted search path vulnerability in gedit'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://www.nabble.com/Bug-484305%3A-bicyclerepair%3A-bike.vim-imports-untrusted-python-files-from-cwd-td18848099.html

Debian bug report for similar eog issue:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504352#4

Proposed patch:
Not sure, if gedi'ts upstream has been reported about this issue.
The Debian patch for similar eog's Python related issue,
available at:

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

should be sufficient to resolve this issue.

Comment 1 Jan Lieskovsky 2009-01-26 11:19:57 UTC
This issue does NOT affect the versions of the gedit package, as shipped
with Red Hat Enterprise Linux 2.1, 3, and 4.

------------------------------------------------------------------------

This issue affects the version of the gedit package, as shipped with
Red Hat Enterprise Linux 5.

Commoent relevant to planned release date of the fix for this issue in
Red Hat Enterprise Linux 5:

The Red Hat Security Response Team has rated this issue as having low security
impact, a future update may address this flaw.  More information regarding
issue severity can be found here:
http://www.redhat.com/security/updates/classification/

Comment 2 Jan Lieskovsky 2009-01-26 11:20:41 UTC
This issue affects all versions of the gedit package, as shipped
with Fedora releases of 9, 10 and devel.

Please fix.

Comment 5 Ray Strode [halfline] 2009-01-26 16:25:41 UTC
I don't think this affects devel.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504352#4 mentions that python 2.6 isn't affected by this issue.  Will need to confirm, of course.

Comment 8 Ray Strode [halfline] 2009-01-26 19:01:34 UTC
Created attachment 330022 [details]
Test case.

Drop into /tmp and run gedit from /tmp

Comment 9 Ray Strode [halfline] 2009-01-26 19:03:24 UTC
I had the python console plugin enabled when testing attachment 330022 [details]

Comment 10 Ray Strode [halfline] 2009-01-26 19:04:13 UTC
rawhide is affected.

Comment 11 Ray Strode [halfline] 2009-01-26 21:43:05 UTC
Created attachment 330031 [details]
Change argument passed to PySys_SetArgv

The eog patch referenced in comment 0 didn't seem to work when applied to gedit.  The above patch fixes it in a different way by ensuring that argv[0] always points to a valid location.

Comment 12 Jan Lieskovsky 2009-01-27 08:04:17 UTC
Upstream bug report:

http://bugzilla.gnome.org/show_bug.cgi?id=569214

Comment 13 Jan Lieskovsky 2009-01-28 10:36:11 UTC
Common Vulnerabilities and Exposures assigned an identifier CVE-2009-0314 to
this vulnerability:

Untrusted search path vulnerability in the Python module in gedit
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-2009-0314
http://www.openwall.com/lists/oss-security/2009/01/26/2
http://bugzilla.gnome.org/show_bug.cgi?id=569214

Comment 14 Ray Strode [halfline] 2009-01-28 14:33:26 UTC
See Bug 482814 for the root python issue.

Comment 15 Fedora Update System 2009-01-29 23:11:54 UTC
gedit-2.24.3-3.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2009-01-29 23:12:09 UTC
gedit-2.22.3-3.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Vincent Danen 2015-02-17 15:35:37 UTC
Statement:

This issue does not affect gedit as shipped in Red Hat Enterprise Linux 3 and 4. It does affect gedit in Red Hat Enterprise Linux 5.

Red Hat Product Security has rated this issue as having Low security impact. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.


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