[29991] in bugtraq

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

Re: Portable OpenSSH: Dangerous AIX linker behavior (aixgcc.adv)

daemon@ATHENA.MIT.EDU (Damien Miller)
Thu May 1 17:04:43 2003

Message-ID: <3EB05BB4.5000501@mindrot.org>
Date: Thu, 01 May 2003 09:26:44 +1000
From: Damien Miller <djm@mindrot.org>
MIME-Version: 1.0
To: Valdis.Kletnieks@vt.edu, bugtraq@securityfocus.com
In-Reply-To: <200304301809.h3UI9P5J005965@turing-police.cc.vt.edu>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Valdis.Kletnieks@vt.edu wrote:
> On Wed, 30 Apr 2003 13:39:49 +1000, Damien Miller <djm@mindrot.org>  said:
> 
>>1. Systems affected:
>>
>>	Users of Portable OpenSSH prior to 3.6.1p2 on AIX are affected 
>>	if OpenSSH was compiled using a non-AIX compiler (e.g. gcc).
> 
> 
> This is the same problem as I spotted in Sendmail 8.10.  Basically,
> somewhere, linking is being done with "-L. -lfoo" or similar (in sendmail's
> case, it was -L../otherdir type stuff).
> 
> Workaround/fix:  Link with "-bnolibpath -blibpath:/usr/local/lib:/usr/lib"
> or similar.

This is what we have done for a long time, but those options only work 
when using xlc as the linker, with gcc you need to specify different 
options.

3.6.1p2 specifies these options correctly, but it illustrates the deeper 
problem: the default is insecure and you need to add workarounds for 
each additional interface to the linker.

I wouldn't be suprised if this affected binaries built with libtool or 
other wrappers, though I haven't checked (we don't use them).

-d


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