what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

GLSA20040401.txt

GLSA20040401.txt
Posted Apr 6, 2004
Site security.gentoo.org

Gentoo Linux Security Advisory GLSA 200404-01 - 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.

tags | advisory, denial of service, local
systems | linux, gentoo
SHA-256 | 827805dcda3188f92aa65e2f7210d6d2fa512f105b8baa91369883d9d206c28e

GLSA20040401.txt

Change Mirror Download
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Gentoo Linux Security Advisory GLSA 200404-01
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
~ http://security.gentoo.org
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

~ Severity: Normal
~ Title: Insecure sandbox temporary lockfile vulnerabilities in
~ Portage
~ Date: April 04, 2004
~ Bugs: #21923
~ ID: 200404-01

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Synopsis
========

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.

Background
==========

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.

Affected packages
=================

~ -------------------------------------------------------------------
~ Package / Vulnerable / Unaffected
~ -------------------------------------------------------------------
~ sys-apps/portage < 2.0.50-r3 >= 2.0.50-r3

Description
===========

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.

Impact
======

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.

Workaround
==========

A workaround is not currently known for this issue. All users are
advised to upgrade to the latest version of Portage.

Resolution
==========

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"

Concerns?
=========

Security is a primary focus of Gentoo Linux and ensuring the
confidentiality and security of our users machines is of utmost
importance to us. Any security concerns should be addressed to
security@gentoo.org or alternatively, you may file a bug at
http://bugs.gentoo.org.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFActamMMXbAy2b2EIRAvS7AJ9ZNP6RDJmchIAB1mKNbBl3vAx79wCfQ9o5
+xERggLqteDI3v4IFaMpFFU=
=shBP
-----END PGP SIGNATURE-----
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close