Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120710141433.GC5296@suse.de>
Date: Tue, 10 Jul 2012 16:14:33 +0200
From: Sebastian Krahmer <krahmer@...e.de>
To: oss-security@...ts.openwall.com
Subject: Re: libdbus hardening

On Tue, Jul 10, 2012 at 06:07:03PM +0400, Solar Designer wrote:
> On Tue, Jul 10, 2012 at 03:58:46PM +0200, Florian Weimer wrote:
> > On 07/10/2012 03:43 PM, Solar Designer wrote:
> > >We already have __secure_getenv() in glibc, which I think is what
> > >libraries like this should be using on systems with glibc.
> > 
> > Sebastian's patches also include a check on prctl(PR_GET_DUMPABLE).  I'm 
> > not sure if the libc approach (compare effective and real UIDs/GIDs on 
> > process start and base process environment trust decisions on that) is 
> > equivalent.
> 
> glibc also uses AT_SECURE.
> 
> PR_GET_DUMPABLE catches the extra case of a process that started e.g. as
> root and has since switched creds, but do we actually want to restrict
> processing of env vars in that case?  Perhaps not, and so AT_SECURE is
> more appropriate.

It is indeed, if you are inside libc. :) But I dont want to parse /proc/self/auxv
from libdbus and do not know any other portable way (I dont want to walk
the stack base either to find auxv).
Maybe my patch is even breaking dbus daemon itself, if it dropped to dbus user?

Thats someting upstream could tell us :)

Sebastian

-- 

~ perl self.pl
~ $_='print"\$_=\47$_\47;eval"';eval
~ krahmer@...e.de - SuSE Security Team

---
SUSE LINUX Products GmbH,
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5
90409 Nürnberg
Germany

Powered by blists - more mailing lists

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.