mailing list of musl libc
 help / color / mirror / code / Atom feed
From: u-wsnj@aetey.se
To: musl@lists.openwall.com
Subject: Re: Re: Busybox on musl is affected by CVE-2015-1817
Date: Wed, 1 Apr 2015 10:49:40 +0200	[thread overview]
Message-ID: <20150401084940.GO23636@example.net> (raw)
In-Reply-To: <551BA847.3040609@gmx.de>

Hi Harald,

On Wed, Apr 01, 2015 at 10:11:51AM +0200, Harald Becker wrote:
> There is a big difference if you talk about suid
> *root* programs or other suid usage.
> 
> The former is definitely very dangerous and should be used with extreme care
> (I think this is the case we are talking about), the later use may even be
> used to drop privileges (not to raise), or to temporarily hop to the

You are right about a remarkable difference between suid root and suid
somethingelse, just because root has the very special role in Unix.
Besides root vs non-root I doubt there is any clear line between "raising"
and "dropping" privileges, you replace one set of allowed operations by
a different one, that's it. Note that root does not need suid to drop
its privileges.

> privileges of a different user (may be allowing access to some files only by
> using specific commands).

As soon as a program is setuid it has to be written for the purpose
of very reliably checking and limiting what it does on behalf of who,
independently of how it can potentially be invoked "out of context".
This is known to be hard, I believe it is harder to do reliably than
e.g. issue a request to a daemon - talking about the complexity level.

Thus the setuid program is to be designed to be as small as possible,
presumably leaving all non-checking functions to (a) different
executable(s). Then the result becomes about as intricate as talking to
a daemon, which can be run without any setuid.

> When used with care and as intended, suid and sgid is a nice feature, but

Unfortunately I can not really appreciate its beauty which appears to hide
the complexity and/or move it to other parties (like the dynamic linker
or the software maintenance infrastructure). Yes it "looks simple and
efficient" but is it, really?

> nowadays there are too many Unix novices, who misunderstand or misuse this,
> punching big holes in every security concern.

Unfortunately even seasoned gurus easily create / fail to notice holes!
:(

Rune



  reply	other threads:[~2015-04-01  8:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-30  5:31 Rich Felker
2015-03-31 19:07 ` Denys Vlasenko
2015-03-31 23:11   ` Justin Cormack
2015-03-31 23:51     ` Rich Felker
2015-03-31 23:48   ` Rich Felker
2015-04-01  7:41     ` u-wsnj
2015-04-01  7:52       ` Raphael Cohn
2015-04-01  8:11       ` Harald Becker
2015-04-01  8:49         ` u-wsnj [this message]
2015-04-02 13:56           ` Harald Becker
2015-04-02 17:26             ` Рысь
2015-04-02 18:16               ` Harald Becker
2015-04-03  4:40                 ` Рысь
2015-04-04  5:35                   ` Harald Becker
2015-04-02 18:36               ` u-wsnj
2015-04-03  4:51                 ` Рысь
2015-04-03 10:31                   ` [OT] setuid (Re: Busybox on musl is affected by CVE-2015-1817) u-wsnj
2015-04-02 15:38           ` Re: Busybox on musl is affected by CVE-2015-1817 Rich Felker
2015-04-02 18:02             ` u-wsnj

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=20150401084940.GO23636@example.net \
    --to=u-wsnj@aetey.se \
    --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).