Joined: 12 May 2004
|Posted: Thu Oct 09, 2008 6:26 pm Post subject: [ GLSA 200810-02 ] Portage: Untrusted search path local root
|Gentoo Linux Security Advisory
Title: Portage: Untrusted search path local root vulnerability (GLSA 200810-02)
Date: October 09, 2008
A search path vulnerability in Portage allows local attackers to execute commands with root privileges if emerge is called from untrusted directories.
Portage is Gentoo's package manager which is responsible for installing, compiling and updating all packages on the system through the Gentoo rsync tree.
Vulnerable: < 184.108.40.206
Unaffected: >= 220.127.116.11
Architectures: All supported architectures
The Gentoo Security Team discovered that several ebuilds, such as sys-apps/portage, net-mail/fetchmail or app-editors/leo execute Python code using "python -c", which includes the current working directory in Python's module search path. For several ebuild functions, Portage did not change the working directory from emerge's working directory.
A local attacker could place a specially crafted Python module in a directory (such as /tmp) and entice the root user to run commands such as "emerge sys-apps/portage" from that directory, resulting in the execution of arbitrary Python code with root privileges.
Do not run "emerge" from untrusted working directories.
All Portage users should upgrade to the latest version:
NOTE: To upgrade to Portage 18.104.22.168 using 22.214.171.124 or prior, you must run emerge from a trusted working directory, such as "/root".
|# cd /root
# emerge --sync
# emerge --ask --oneshot --verbose ">=sys-apps/portage-126.96.36.199"