All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serge@hallyn.com>
To: Aaron Jones <aaronmdjones@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: File capabilities are not 'working' and I have no idea why
Date: Thu, 6 Feb 2014 22:30:36 +0100	[thread overview]
Message-ID: <20140206213036.GA24641@mail.hallyn.com> (raw)
In-Reply-To: <52F13D11.8090009@gmail.com>

Quoting Aaron Jones (aaronmdjones@gmail.com):
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> I have isolated the problem. File capabilities are not assigned when
> the program being executed is located on a filesystem mounted with
> the "nosuid" option.
> 
> This seems counter-intuitive; a fully capability-based system would
> not use setuid binaries...

Not strictly true.  setuid really just means 'change uid'.  The fact
that it can also raise/lower capability sets just muddles the issue.
If you want that behavior stopped you can do so using
SECBIT_NO_SETUID_FIXUP.

>  so a logical thing to do would be to
> prevent the setuid bits from doing anything, which is what the
> nosuid flag is for, no?
> 
> Or am I missing something?
> 
> Can we get a config flag to toggle this behaviour?

I think generally when people mount nosuid it is to prevent
an untrusted source (usb stick, whatever) from providing a
untrusted but privileged program.  Be that through setuid-root
binaries or file capabilities.

-serge

      reply	other threads:[~2014-02-06 21:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-21 13:25 File capabilities are not 'working' and I have no idea why Aaron Jones
2014-01-26 16:22 ` Serge E. Hallyn
2014-01-26 16:28   ` Aaron Jones
2014-02-04 19:18 ` Aaron Jones
2014-02-06 21:30   ` Serge E. Hallyn [this message]

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=20140206213036.GA24641@mail.hallyn.com \
    --to=serge@hallyn.com \
    --cc=aaronmdjones@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.