[36209] in bugtraq

home help back first fref pref prev next nref lref last post

Re: [ GLSA 200408-16 ] glibc: Information leak with LD_DEBUG

daemon@ATHENA.MIT.EDU (Jim Paris)
Sat Aug 21 14:26:55 2004

Date: Fri, 20 Aug 2004 03:24:53 -0400
From: Jim Paris <jim@jtan.com>
To: bugtraq@securityfocus.com
Message-ID: <20040820072453.GA9801@jim.sh>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20040817131204.GQ29077@mail.lieber.org>

> 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

home help back first fref pref prev next nref lref last post