This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 481565 (CVE-2009-0316)

Summary: CVE-2009-0316 vim: untrusted python modules search path
Product: [Other] Security Response Reporter: Jan Lieskovsky <jlieskov>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: bressers, chtan, karsten, psplicha
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://www.nabble.com/Bug-484305%3A-bicyclerepair%3A-bike.vim-imports-untrusted-python-files-from-cwd-td18848099.html
Whiteboard: public=20080806,reported=20081112,source=internet,impact=low,rhel-4/vim=notaffected,rhel-5/vim=wontfix
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-02 14:17:21 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On: 482814    
Bug Blocks:    

Description Jan Lieskovsky 2009-01-26 07:45:30 EST
Untrusted search path vulnerability in the of Vim 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 (test case, PoC):
http://www.nabble.com/Bug-484305%3A-bicyclerepair%3A-bike.vim-imports-untrusted-python-files-from-cwd-td18848099.html

Proposed patch:
The Debian patch for similar dia's Python related issue,
available at:

http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=pythonpath.diff;att=1;bug=504251

should be sufficient to resolve this issue.
Comment 1 Jan Lieskovsky 2009-01-26 07:47:15 EST
This issue does NOT affect the version of the Vim package, as shipped
with Red Hat Enterprise Linux 2.1.

This issue affects the versions of the Vim package, as shipped 
with Red Hat Enterprise Linux 3, 4, and 5. 

Comment relevant to fixes for RHEL-{3,4,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 07:48:52 EST
This issue affects the versions of the Vim package, as shipped 
with Fedora releases of 9, 10 and devel.

Please fix.
Comment 3 Karsten Hopp 2009-01-26 11:24:51 EST
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=493937

This has been fixed upstream with patch 7.2.045
Fedora releases 9, 10 and devel are at least at patchlevel 60 and are not vulnerable.
Comment 4 Jan Lieskovsky 2009-01-28 05:58:38 EST
Common Vulnerabilities and Exposures assigned an identifier CVE-2009-0316 to
this vulnerability:

Untrusted search path vulnerability in the Python module in vim 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-0316
http://www.nabble.com/Bug-484305%3A-bicyclerepair%3A-bike.vim-imports-untrusted-python-files-from-cwd-td18848099.html
http://www.openwall.com/lists/oss-security/2009/01/26/2
Comment 5 Petr Šplíchal 2009-04-27 09:50:19 EDT
I guess this issue does not affect RHEL-{3,4} as the vim package
is compiled without python support on these.

# vim --version
VIM - Vi IMproved 6.3 (2004 June 7, compiled Nov 17 2008 08:14:13)
...
+path_extra +perl +postscript +printer -python +quickfix +rightleft -ruby
Comment 6 Tomas Hoger 2009-07-13 08:11:28 EDT
(In reply to comment #3)
> This has been fixed upstream with patch 7.2.045

Upstream fix:
http://vim.svn.sourceforge.net/viewvc/vim/vim7/src/if_python.c?r1=1124&r2=1257
ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.045
Comment 7 Josh Bressers 2010-05-19 16:46:26 EDT
Statement:

This issue did not affect vim as shipped in Red Hat Enterprise Linux 3 and 4. This issue is not planned to be fixed in vim packages in Red Hat Enterprise Linux 5.