mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: Will musl work as a lsb alternative? (was Re: [musl] re: musl setup attempt)
Date: Thu, 28 Mar 2013 08:12:29 -0400	[thread overview]
Message-ID: <20130328121229.GZ20323@brightrain.aerifal.cx> (raw)
In-Reply-To: <1364444921.18069.1@driftwood>

On Wed, Mar 27, 2013 at 11:28:41PM -0500, Rob Landley wrote:
> >> it is possible to use the path/to/libc.so <command> trick or an ELF
> >> editor to circumvent this. Currently, you might want to include most
> >> of the libraries if you go for this.
> >
> >Yes, you could definitely do this with a shell script wrapper too. It
> >would work a lot better if we added command line options to the
> >dynamic linker, so that you could do something like:
> >
> >exec /opt/myapp/bin/ld-musl-$(ARCH).so.1 --libpath /opt/myapp/lib -- \
> >  /opt/myapp/bin/myapp "$@"
> 
> You're aware that other C libraries let you switch this off because
> it renders the noexec flag to mount completely useless, right? Or
> did you have a fix for that?

You can do the same thing via LD_PRELOAD, and probably a number of
other ways. In my opinion, trying to prevent a user who already has a
unix account and non-restricted shell from running their own binaries
is usually a misguided security effort. If somebody is using musl in a
situation where they can really benefit from this, or if it just makes
their boss who knows nothing about security happy, it would be super
easy to patch out these features. If at some future date we have
switchable build features (but see the past threads on this topic for
some thoughts on the scope of such), and there's demand, locking down
the dynamic linker/loader could perhaps be one of them.

Rich


  reply	other threads:[~2013-03-28 12:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-26 13:02 LM
2013-03-26 23:03 ` Rich Felker
2013-03-27  1:40   ` Isaac Dunham
2013-03-27  3:20     ` Rich Felker
2013-03-28  4:28       ` Rob Landley
2013-03-28 12:12         ` Rich Felker [this message]
2013-03-27 13:58     ` Rob Landley
2013-03-27 15:11       ` LM
2013-03-27 14:23     ` LM
2013-03-27 22:14       ` Isaac Dunham
2013-03-28 11:56         ` LM
2013-03-27 16:21   ` R P Herrold
2013-03-27 17:18     ` Kurt H Maier

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=20130328121229.GZ20323@brightrain.aerifal.cx \
    --to=dalias@aerifal.cx \
    --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).