Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 8 Mar 2011 03:00:11 +0300
From: "Dmitry V. Levin" <ldv@...linux.org>
To: oss-security@...ts.openwall.com
Subject: Re: ldd can execute an app unexpectedly

On Mon, Mar 07, 2011 at 06:27:05PM -0500, Steve Grubb wrote:
[...]
>  http://reverse.lostrealm.com/protect/ldd.html
>  http://www.catonmat.net/blog/ldd-arbitrary-code-execution/
> 
> Besides telling everyone don't do that. ldd could take the PoV that it should only 
> call runtime linkers in trusted directories like /sbin or /usr/sbin. Or it could 
> simply detect that another linker was requested and make you add a "--force" so that 
> you are fully aware that you just let another linker run. (The suggested patch can 
> certainly be improved. But its here just in case you want it.)

In June of 2002, I suggested to change ldd to avoid invoking programs
directly, even when it seems like that would work, and invoke the dynamic
linker as a program instead.
This change was implemented at least in Owl and ALT Linux:
http://cvsweb.openwall.com/cgi/cvsweb.cgi/~checkout~/Owl/packages/glibc/glibc-2.3.6-owl-alt-ldd.diff
http://git.altlinux.org/gears/g/glibc.git?p=glibc.git;a=commitdiff;h=788577027d2950e9508a434475e04c3af864d169


-- 
ldv

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Your e-mail address:

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.