portage-ng / portage / app-portage / esearch / 9999
portage-ng glsa
1 advisory reference app-portage/esearch · none place version 9999 in a vulnerable range
▸ GLSA 200407-01 Esearch: Insecure temp file handling this version unaffected normal local 2004-07-01

The eupdatedb utility in esearch creates a file in /tmp without first checking for symlinks. This makes it possible for any user to create arbitrary files.

Announced
2004-07-01
Revised
2006-05-22 (revision 2)
Access
local
Bugs
#55424
Advisory
https://security.gentoo.org/glsa/200407-01

Affected packages

PackageArchVulnerableUnaffected
app-portage/esearch*<= 0.6.1>= 0.6.2

Background

Esearch is a replacement for the Portage command "emerge search". It uses an index to speed up searching of the Portage tree.

Description

The eupdatedb utility uses a temporary file (/tmp/esearchdb.py.tmp) to indicate that the eupdatedb process is running. When run, eupdatedb checks to see if this file exists, but it does not check to see if it is a broken symlink. In the event that the file is a broken symlink, the script will create the file pointed to by the symlink, instead of printing an error and exiting.

Impact

An attacker could create a symlink from /tmp/esearchdb.py.tmp to a nonexistent file (such as /etc/nologin), and the file will be created the next time esearchdb is run.

Workaround

There is no known workaround at this time. All users should upgrade to the latest available version of esearch.

Resolution

All users should upgrade to the latest available version of esearch, as follows:

# emerge sync

# emerge -pv ">=app-portage/esearch-0.6.2"
# emerge ">=app-portage/esearch-0.6.2"

References