From: Theodore Tso <tytso@mit.edu>
To: Markku Savela <msa@moth.iki.fi>
Cc: Pavel Machek <pavel@suse.cz>, linux-kernel@vger.kernel.org
Subject: Re: Frustrated with capabilities..
Date: Thu, 28 Aug 2008 13:48:54 -0400 [thread overview]
Message-ID: <20080828174854.GM26987@mit.edu> (raw)
In-Reply-To: <200808281445.m7SEjYsB007502@burp.tkv.asdf.org>
On Thu, Aug 28, 2008 at 05:45:34PM +0300, Markku Savela wrote:
>
> > From: Pavel Machek <pavel@suse.cz>
>
> > Yes, you need upcoming filesystem capabilities. Binary may not
> > inherit capabilities unless filesystem flags permit that.
>
> I think this is wrong. Normal executables inherit uid/gid and
> supplementary groups by default. Why should capabilities be any
> different?
Well, because that's not the what the POSIX draft specification (and
the rest of the Unix industry who were striving to meet the US
Department of Defense's "B2 by '92" initiative) ended up implementing.
The reason for that was to avoid bugs where a program that wasn't
expecting to be setuid (or just written by a stupid progammer) exec's
some program which wasn't expecting to have root privileges then bad
things happen. The classic example of this was running the mail
program, which was setuid or setgid to the mail user/group, and then
typing "!/bin/sh" which would exec a shell running with those
privileges (because the mail program didn't know to drop its
privileges).
So in the capabilities model, the capabilities do *not* inherit unless
the a particular file explicitly states that it should inherit the
capabilities. It's the principle of least privilege taken to its
logical conclusion.
- Ted
next prev parent reply other threads:[~2008-08-28 17:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-27 9:31 Frustrated with capabilities Markku Savela
2008-08-28 14:18 ` Pavel Machek
2008-08-28 14:45 ` Markku Savela
2008-08-28 17:48 ` Theodore Tso [this message]
2008-08-28 21:03 ` David P. Quigley
2008-08-29 4:47 ` Casey Schaufler
2008-08-29 14:20 ` David P. Quigley
2008-08-29 10:18 ` Markku Savela
2008-08-29 10:47 ` James Morris
2008-08-29 14:07 ` Theodore Tso
2008-08-29 17:11 ` Serge E. Hallyn
2008-08-29 16:58 ` Serge E. Hallyn
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=20080828174854.GM26987@mit.edu \
--to=tytso@mit.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=msa@moth.iki.fi \
--cc=pavel@suse.cz \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox