mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Vasiliy Kulikov <segoon@openwall.com>
To: musl@lists.openwall.com
Subject: Re: LD_PRELOAD and RTLD_NEXT support
Date: Tue, 16 Aug 2011 10:34:10 +0400	[thread overview]
Message-ID: <20110816063410.GA4254@albatros> (raw)
In-Reply-To: <20110816051715.GN132@brightrain.aerifal.cx>

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


  reply	other threads:[~2011-08-16  6:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-16  5:17 Rich Felker
2011-08-16  6:34 ` Vasiliy Kulikov [this message]
2011-08-16 11:47   ` Rich Felker
2011-08-16 12:46     ` Vasiliy Kulikov
2011-08-16 12:59       ` Rich Felker
2011-08-22 17:02       ` env vars in SUID/SGID programs (was: LD_PRELOAD and RTLD_NEXT support) Solar Designer
2011-08-22 18:13         ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110816063410.GA4254@albatros \
    --to=segoon@openwall.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).