PDA

Bekijk Volledige Versie : [ GLSA 200408-16 ] glibc: Information leak with LD_DEBUG



Kurt Lieber
20/08/04, 07:35
--HPavfUb3xGsK+Jcp
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Gentoo Linux Security Advisory GLSA 200408-16
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
http://security.gentoo.org/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Severity: Low
Title: glibc: Information leak with LD_DEBUG
Date: August 16, 2004
Bugs: #59526
ID: 200408-16

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

Synopsis
========

glibc contains an information leak vulnerability allowing the debugging
of SUID binaries.

Background
==========

The GNU C library defines various Unix-like "system calls" and other
basic facilities needed for a standard POSIX-like application to
operate.

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

-------------------------------------------------------------------
Package / Vulnerable / Unaffected
-------------------------------------------------------------------
1 sys-libs/glibc <= 2.3.2-r10 >= 2.3.2-r11
2 sys-libs/glibc <= 2.3.3.20040420 >= 2.3.3.20040420-r1
3 sys-libs/glibc <= 2.3.3.20040420 >= 2.3.4.20040619-r1
4 sys-libs/glibc <= 2.3.4.20040619 >= 2.3.4.20040619-r1
5 sys-libs/glibc <= 2.3.2-r10 Vulnerable!
6 sys-libs/glibc <= 2.3.4.20040605 Vulnerable!
-------------------------------------------------------------------
# Package 1 only applies to ALPHA, ARM, HPPA, IA64 and SPARC
users.
# Package 2 only applies to x86 and PPC users.
# Package 3 only applies to MIPS users.
# Package 4 only applies to AMD64 users.
# Package 5 only applies to S390 users.
# Package 6 only applies to PPC64 users.
-------------------------------------------------------------------
NOTE: Certain packages are still vulnerable. Users should migrate
to another package if one is available or wait for the
existing packages to be marked stable by their
architecture maintainers.
-------------------------------------------------------------------
6 affected packages; please see the notes above...
-------------------------------------------------------------------

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

Silvio Cesare discovered a potential information leak in glibc. It
allows LD_DEBUG on SUID binaries where it should not be allowed. This
has various security implications, which may be used to gain
confidentional information.

Impact
======

An attacker can gain the list of symbols a SUID application uses and
their locations and can then use a trojaned library taking precendence
over those symbols to gain information or perform further exploitation.

Workaround
==========

There is no known workaround at this time. All users are encouraged to
upgrade to the latest available version of glibc.

Resolution
==========

All glibc users should upgrade to the latest version:

# emerge sync

# emerge -pv your_version
# emerge your_version

Availability
============

This GLSA and any updates to it are available for viewing at
the Gentoo Security Website:

http://security.gentoo.org/glsa/glsa-200408-16.xml

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.

License
=======

Copyright 2004 Gentoo Foundation, Inc; referenced text
belongs to its owner(s).

The contents of this document are licensed under the
Creative Commons - Attribution / Share Alike license.

http://creativecommons.org/licenses/by-sa/1.0

--HPavfUb3xGsK+Jcp
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBIgQkJPpRNiftIEYRAp7TAKCP5dZKwSziikfUDKzHlJ WdvVtMbwCdHEXz
vTKBJDRwXaTLRqis2piFL1Y=
=2NUe
-----END PGP SIGNATURE-----

--HPavfUb3xGsK+Jcp--

Jim Paris
22/08/04, 15:45
> Silvio Cesare discovered a potential information leak in glibc. It
> allows LD_DEBUG on SUID binaries where it should not be allowed. This
> has various security implications, which may be used to gain
> confidentional information.

It's worse than that. You can essentially single-step through the
library calls of a binary by turning on verbose debugging through
LD_DEBUG and then carefully controlling stdout so that the program
blocks while writing the debugging output. I've used this to exploit
race conditions in setuid binaries that would otherwise be nearly
impossible to trigger.

Gentoo's method of adding LD_DEBUG to UNSECURE_ENVVARS will prevent
this.

-jim

Solar Designer
22/08/04, 16:55
On Fri, Aug 20, 2004 at 03:24:53AM -0400, Jim Paris wrote:
> > Silvio Cesare discovered a potential information leak in glibc. It
> > allows LD_DEBUG on SUID binaries where it should not be allowed. This
> > has various security implications, which may be used to gain
> > confidentional information.
>
> It's worse than that. You can essentially single-step through the
> library calls of a binary by turning on verbose debugging through
> LD_DEBUG and then carefully controlling stdout so that the program
> blocks while writing the debugging output. I've used this to exploit
> race conditions in setuid binaries that would otherwise be nearly
> impossible to trigger.
>
> Gentoo's method of adding LD_DEBUG to UNSECURE_ENVVARS will prevent
> this.

FWIW, this has been dealt with in Openwall GNU/*/Linux (Owl) before our
project was first announced to the public 3+ years ago. ALT Linux is
another (or the other?) distribution vendor which also dealt with this
roughly 3 years ago.

Our patch sets and replacements for the various packages are available
for consideration and possible re-use by other distributions. The
patches are easy to get without having to download the entire system -
as a small tarball (only 1.5 MB gzipped) available on our FTP mirrors
or from our public anoncvs and CVSweb servers:

http://www.openwall.com/Owl/DOWNLOAD.shtml

--
Alexander Peslyak <solar at openwall.com>
GPG key ID: B35D3598 fp: 6429 0D7E F130 C13E C929 6447 73C3 A290 B35D 3598
http://www.openwall.com - bringing security into open computing environments