Lucene search

K
gentooGentoo FoundationGLSA-200810-02
HistoryOct 09, 2008 - 12:00 a.m.

Portage: Untrusted search path local root vulnerability

2008-10-0900:00:00
Gentoo Foundation
security.gentoo.org
18

CVSS2

6.9

Attack Vector

LOCAL

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:L/AC:M/Au:N/C:C/I:C/A:C

EPSS

0.001

Percentile

29.6%

Background

Portage is Gentoo’s package manager which is responsible for installing, compiling and updating all packages on the system through the Gentoo rsync tree.

Description

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.

Impact

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.

Workaround

Do not run “emerge” from untrusted working directories.

Resolution

All Portage users should upgrade to the latest version:

 # cd /root
 # emerge --sync
 # emerge --ask --oneshot --verbose ">=sys-apps/portage-2.1.4.5"

NOTE: To upgrade to Portage 2.1.4.5 using 2.1.4.4 or prior, you must run emerge from a trusted working directory, such as “/root”.

OSVersionArchitecturePackageVersionFilename
Gentooanyallsys-apps/portage< 2.1.4.5UNKNOWN

CVSS2

6.9

Attack Vector

LOCAL

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:L/AC:M/Au:N/C:C/I:C/A:C

EPSS

0.001

Percentile

29.6%