Multiple vulnerabilities have been found in Portage.
| Package | Arch | Vulnerable | Unaffected |
|---|---|---|---|
| sys-apps/portage | * | < 3.0.81.2 | >= 3.0.81.2 |
Portage is the default Gentoo package management system.
Multiple vulnerabilities have been discovered in Portage. Please review the bugs referenced below for details. The first bug (bug 978478) allows a malicious ebuild (including a build system it uses indirectly) to write outside of the work directory. While malicious artifacts could be installed by a package itself, this is still unexpected if one only ran the configure phrase during development. The second bug (bug 979026) is regarding insufficient sandboxing in global scope. Untrusted ebuilds, even if not emerged, may have the opportunity to run code in global scope depending on whether the repository has metadata available. Additional sandboxing has been added.
Please review the referenced bugs for details.
Avoid using untrusted repositories or ebuilds, even without installing them.
All Portage users should upgrade to the latest version:
# emerge --sync # emerge --ask --oneshot --verbose ">=sys-apps/portage-3.0.81.2"
In general, we recommend users add external repositories with caution. If using external repositories, it is good practice to mask all packages by default from that repository, and unmask only needed packages.
A vulnerability has been discovered in Portage, where PGP signatures would not be verified.
| Package | Arch | Vulnerable | Unaffected |
|---|---|---|---|
| sys-apps/portage | * | < 3.0.47 | >= 3.0.47 |
Portage is the default Gentoo package management system.
Multiple vulnerabilities have been discovered in Portage. Please review the CVE identifiers referenced below for details.
When using the webrsync mechanism to sync the tree the PGP signatures that protect the integrity of the data in the tree would not be verified. This would allow a man-in-the-middle attack to inject arbitrary content into the tree.
There is no known workaround at this time.
All Portage users should upgrade to the latest version:
# emerge --sync # emerge --ask --oneshot --verbose ">=sys-apps/portage-3.0.47"
A vulnerability in emerge-delta-webrsync and Portage could result in a man-in-the-middle attack.
| Package | Arch | Vulnerable | Unaffected |
|---|---|---|---|
| app-portage/emerge-delta-webrsync | * | < 3.7.4 | >= 3.7.4 |
| sys-apps/portage | * | < 2.3.22 | >= 2.3.22 |
Portage is the package management and distribution system for Gentoo.
A vulnerability was discovered in emerge-delta-webrsync and Portage that did not properly validate the revocation status of GPG keys.
A remote attacker could conduct a man-in-the-middle attack. Please review the referenced bug for specific details.
There is no known workaround at this time.
All emerge-delta-webrsync users should upgrade to the latest version:
# emerge --sync # emerge --ask --oneshot --verbose ">=app-portage/emerge-delta-webrsync-3.7.4"
All Portage users should upgrade to the latest version:
# emerge --sync # emerge --ask --oneshot --verbose ">=sys-apps/portage-2.3.22"
A vulnerability in Portage's urlopen function could allow a remote attacker to conduct a man-in-the-middle attack.
| Package | Arch | Vulnerable | Unaffected |
|---|---|---|---|
| sys-apps/portage | * | < 2.1.12.2 | >= 2.1.12.2 |
Portage is the package management and distribution system for Gentoo.
Portage does not verify X.509 SSL certificates properly if HTTPS is used.
A remote attacker can spoof servers and modify binary package lists via specially crafted certificates.
There is no known workaround at this time.
All Portage users should upgrade to the latest version:
# emerge --sync # emerge --ask --oneshot --verbose ">=sys-apps/portage-2.1.12.2"
A search path vulnerability in Portage allows local attackers to execute commands with root privileges if emerge is called from untrusted directories.
| Package | Arch | Vulnerable | Unaffected |
|---|---|---|---|
| sys-apps/portage | * | < 2.1.4.5 | >= 2.1.4.5 |
Portage is Gentoo's package manager which is responsible for installing, compiling and updating all packages on the system through the Gentoo rsync tree.
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:
# 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".
Portage may disclose sensitive information when updating configuration files.
| Package | Arch | Vulnerable | Unaffected |
|---|---|---|---|
| sys-apps/portage | * | < 2.1.3.11 | >= 2.1.3.11 |
Portage is the default Gentoo package management system.
Mike Frysinger reported that the "etc-update" utility uses temporary files with the standard umask, which results in the files being world-readable when merging configuration files in a default setup.
A local attacker could access sensitive information when configuration files are being merged.
There is no known workaround at this time.
All Portage users should upgrade to the latest version:
# emerge --sync # emerge --ask --oneshot --verbose ">=sys-apps/portage-2.1.3.11"
dispatch-conf (included in Portage) and qpkg (included in Gentoolkit) are vulnerable to symlink attacks, potentially allowing a local user to overwrite arbitrary files with the rights of the user running the script.
| Package | Arch | Vulnerable | Unaffected |
|---|---|---|---|
| app-portage/gentoolkit | * | <= 0.2.0_pre10 | >= 0.2.0_pre10-r1, >= 0.2.0_pre8-r1 (revision) |
| sys-apps/portage | * | <= 2.0.51-r2 | >= 2.0.51-r3 |
Portage is Gentoo's package management tool. The dispatch-conf utility allows for easy rollback of configuration file changes and automatic updates of configurations files never modified by users. Gentoolkit is a collection of Gentoo specific administration scripts, one of which is the portage querying tool qpkg.
dispatch-conf and qpkg use predictable filenames for temporary files.
A local attacker could create symbolic links in the temporary files directory, pointing to a valid file somewhere on the filesystem. When an affected script is called, this would result in the file to be overwritten with the rights of the user running the dispatch-conf or qpkg, which could be the root user.
There is no known workaround at this time.
All Portage users should upgrade to the latest version:
# emerge --sync # emerge --ask --oneshot --verbose ">=sys-apps/portage-2.0.51-r3"
All Gentoolkit users should upgrade to the latest version:
# emerge --sync # emerge --ask --oneshot --verbose ">=app-portage/gentoolkit-0.2.0_pre8-r1"
A flaw has been found in the temporary file handling algorithms for the sandboxing code used within Portage. Lockfiles created during normal Portage operation of portage could be manipulated by local users resulting in the truncation of hard linked files; causing a Denial of Service attack on the system.
| Package | Arch | Vulnerable | Unaffected |
|---|---|---|---|
| sys-apps/portage | * | < 2.0.50-r3 | >= 2.0.50-r3 |
Portage is Gentoo's package management system which is responsible for installing, compiling and updating any ebuilds on the system through the Gentoo rsync tree. Under default configurations, most ebuilds run under a sandbox which prevent the build process writing to the "real" system outside the build directory - packages are installed into a temporary location and then copied over safely by Portage instead. During the process the sandbox wrapper creates lockfiles in the /tmp directory which are vulnerable to a hard-link attack.
A flaw in Portage's sandbox wrapper has been found where the temporary lockfiles are subject to a hard-link attack which allows linkable files to be overwritten to an empty file. This can be used to damage critical files on a system causing a Denial of Service, or alternatively this attack may be used to cause other security risks; for example firewall configuration data could be overwritten without notice.
The vulnerable sandbox functions have been patched to test for these new conditions: namely; for the existance of a hard-link which would be removed before the sandbox process would continue, for the existance of a world-writable lockfile in which case the sandbox would also remove it, and also for any mismatches in the UID ( anything but root ) and the GID ( anything but the group of the sandbox process ).
If the vulnerable files cannot be removed by the sandbox, then the sandbox would exit with a fatal error warning the adminstrator of the issue. The patched functions also fix any other sandbox I/O operations which do not explicitly include the mentioned lockfile.
Any user with write access to the /tmp directory can hard-link a file to /tmp/sandboxpids.tmp - this file would eventually be replaced with an empty one; effectively wiping out the file it was linked to as well with no prior warning. This could be used to potentially disable a vital component of the system and cause a path for other possible exploits.
This vulnerability only affects systems that have /tmp on the root partition: since symbolic link attacks are filtered, /tmp has to be on the same partition for an attack to take place.
A workaround is not currently known for this issue. All users are advised to upgrade to the latest version of the affected package.
Users should upgrade to Portage 2.0.50-r3 or later:
# emerge sync # emerge -pv ">=sys-apps/portage-2.0.50-r3" # emerge ">=sys-apps/portage-2.0.50-r3"