<<< Date Index >>>     <<< Thread Index >>>

Re: Symlink Vulnerability in GNU libtool <1.5.2



ÿþpvheader: 
wHlck8DhilDjPLXvroKfLXJlqWUwq5UyOUnushJMl2qybE0idTVTOxwv0SiKj/0Vzql9YluLQrH+auHyTPYA9NscnODJl1AR4mHFSW54++mWa390jQ4ShePCufy+SNqqFHKyB0f1GHrsaIHxYKumYMO/M3RcmoEz
Content-Class: urn:content-classes:message
From: "Joseph S. Myers" <jsm@xxxxxxxxxxxxxxxx>
Date: Tue, 3 Feb 2004 21:01:50 -0800
Mailing-List: contact bugtraq-help@xxxxxxxxxxxxxxxxx; run by ezmlm
Precedence: bulk
List-Id: <bugtraq.list-id.securityfocus.com>
List-Post: <mailto:bugtraq@xxxxxxxxxxxxxxxxx>
List-Help: <mailto:bugtraq-help@xxxxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:bugtraq-unsubscribe@xxxxxxxxxxxxxxxxx>
List-Subscribe: <mailto:bugtraq-subscribe@xxxxxxxxxxxxxxxxx>
Delivered-To: mailing list bugtraq@xxxxxxxxxxxxxxxxx
Delivered-To: moderator for bugtraq@xxxxxxxxxxxxxxxxx
Sender: "Joseph S. Myers" <jsm@xxxxxxxxxxxxxxxx>
Return-Path: <bugtraq-return-12765-mleebert=diversa.com@xxxxxxxxxxxxxxxxx>

On Fri, 30 Jan 2004, Stefan Nordhausen wrote:

> Solution:
> Updating to libtool 1.5.2 (the current stable release) will eliminate
> the vulnerability. If you want to stick with your old version of libtool
> you can easily fix this bug yourself. In "ltmain.in" (or file "libtool", 
> whichever applies for you) you should replace the line:
> 
> if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
> 
> with
> 
> if $mkdir "$tmpdir" && chmod 700 "$tmpdir"; then :

The chmod has a race (that access to the temporary directory could be
gained after it is created but before it is chmoded) - which I pointed out
when I reported this security bug four years ago
<http://www.geocrawler.com/mail/msg.php3?msg_id=3438808&list=405> - so is
of limited security value.  Alexandre Oliva's patch at that time
(<orsnxk8oqu.fsf@xxxxxxxxxxxxxxxxxxxxxxxxx> on libtool-patches) used umask
to avoid that problem, but wasn't committed (an entirely separate patch
was committed under that log message).

-- 
Joseph S. Myers
jsm@xxxxxxxxxxxxxxxx