Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 16 Aug 2011 10:34:10 +0400
From: Vasiliy Kulikov <segoon@...nwall.com>
To: musl@...ts.openwall.com
Subject: Re: LD_PRELOAD and RTLD_NEXT support

Rich,

On Tue, Aug 16, 2011 at 01:17 -0400, Rich Felker wrote:
> (fully disabled for any suid/sgid binary)

        if ((aux[0]&0x7800)!=0x7800 || aux[AT_UID]!=aux[AT_EUID]
          || aux[AT_GID]!=aux[AT_EGID]) {

Two things here:

1) This check should be extended to support AT_SECURE (dumpable flag,
any LSM security domains, capabilities).

2) As you check for (aux[0] & 0x7800) you assume some of these elements
can be absent.  I feel it's wrong to assume you're not s*id'ed in this
case.  Instead, it's better to check for (getuid()!=geteuid() ||
getgid()!=getegid()).

Thanks,

-- 
Vasiliy

Powered by blists - more mailing lists

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