1 |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
2 |
Gentoo Linux Security Advisory GLSA 200810-02 |
3 |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
4 |
http://security.gentoo.org/ |
5 |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
6 |
|
7 |
Severity: High |
8 |
Title: Portage: Untrusted search path local root vulnerability |
9 |
Date: October 09, 2008 |
10 |
Bugs: #239560 |
11 |
ID: 200810-02 |
12 |
|
13 |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
14 |
|
15 |
Synopsis |
16 |
======== |
17 |
|
18 |
A search path vulnerability in Portage allows local attackers to |
19 |
execute commands with root privileges if emerge is called from |
20 |
untrusted directories. |
21 |
|
22 |
Background |
23 |
========== |
24 |
|
25 |
Portage is Gentoo's package manager which is responsible for |
26 |
installing, compiling and updating all packages on the system through |
27 |
the Gentoo rsync tree. |
28 |
|
29 |
Affected packages |
30 |
================= |
31 |
|
32 |
------------------------------------------------------------------- |
33 |
Package / Vulnerable / Unaffected |
34 |
------------------------------------------------------------------- |
35 |
1 sys-apps/portage < 2.1.4.5 >= 2.1.4.5 |
36 |
|
37 |
Description |
38 |
=========== |
39 |
|
40 |
The Gentoo Security Team discovered that several ebuilds, such as |
41 |
sys-apps/portage, net-mail/fetchmail or app-editors/leo execute Python |
42 |
code using "python -c", which includes the current working directory in |
43 |
Python's module search path. For several ebuild functions, Portage did |
44 |
not change the working directory from emerge's working directory. |
45 |
|
46 |
Impact |
47 |
====== |
48 |
|
49 |
A local attacker could place a specially crafted Python module in a |
50 |
directory (such as /tmp) and entice the root user to run commands such |
51 |
as "emerge sys-apps/portage" from that directory, resulting in the |
52 |
execution of arbitrary Python code with root privileges. |
53 |
|
54 |
Workaround |
55 |
========== |
56 |
|
57 |
Do not run "emerge" from untrusted working directories. |
58 |
|
59 |
Resolution |
60 |
========== |
61 |
|
62 |
All Portage users should upgrade to the latest version: |
63 |
|
64 |
# cd /root |
65 |
# emerge --sync |
66 |
# emerge --ask --oneshot --verbose ">=sys-apps/portage-2.1.4.5" |
67 |
|
68 |
NOTE: To upgrade to Portage 2.1.4.5 using 2.1.4.4 or prior, you must |
69 |
run emerge from a trusted working directory, such as "/root". |
70 |
|
71 |
References |
72 |
========== |
73 |
|
74 |
[ 1 ] CVE-2008-4394 |
75 |
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-4394 |
76 |
|
77 |
Availability |
78 |
============ |
79 |
|
80 |
This GLSA and any updates to it are available for viewing at |
81 |
the Gentoo Security Website: |
82 |
|
83 |
http://security.gentoo.org/glsa/glsa-200810-02.xml |
84 |
|
85 |
Concerns? |
86 |
========= |
87 |
|
88 |
Security is a primary focus of Gentoo Linux and ensuring the |
89 |
confidentiality and security of our users machines is of utmost |
90 |
importance to us. Any security concerns should be addressed to |
91 |
security@g.o or alternatively, you may file a bug at |
92 |
http://bugs.gentoo.org. |
93 |
|
94 |
License |
95 |
======= |
96 |
|
97 |
Copyright 2008 Gentoo Foundation, Inc; referenced text |
98 |
belongs to its owner(s). |
99 |
|
100 |
The contents of this document are licensed under the |
101 |
Creative Commons - Attribution / Share Alike license. |
102 |
|
103 |
http://creativecommons.org/licenses/by-sa/2.5 |