From: Will Drewry <redpig@dataspill.org>
To: "Andrew G. Morgan" <morgan@kernel.org>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>,
linux-kernel@vger.kernel.org, James Morris <jmorris@namei.org>,
linux-security-module@vger.kernel.org,
David Howells <dhowells@redhat.com>
Subject: Re: [RFC][PATCH 1/1] support optional non-VFS capability inheritance without disabling file caps
Date: Mon, 17 Aug 2009 11:48:54 -0500 [thread overview]
Message-ID: <2359eed20908170948p6612b075mc245aa4fb92e76aa@mail.gmail.com> (raw)
In-Reply-To: <551280e50908170826o6f189354n4fd64a1cb601489f@mail.gmail.com>
On Mon, Aug 17, 2009 at 10:26 AM, Andrew G. Morgan<morgan@kernel.org> wrote:
> On Mon, Aug 17, 2009 at 7:38 AM, Will Drewry<redpig@dataspill.org> wrote:
[snip]
>> It is almost possible to achieve #2 on existing systems, assuming xattr
>> support can always be achieved.
>> Step 1, setcap cap_sys_rawio+i /usr/bin/pulseaudio
>> Step 2, pam_cap at X11 login to add cap_sys_rawio+i for a user session
>> (alternately, use capsh).
>> Step 3, run pulseaudio (pP' = (...) | (fI & pI) => cap_sys_rawio+ip)
>
> What about filecaps of cap_sys_rawio+eip on pulseaudio. With the
> bounding set suppressing cap_sys_rawio?
>
> In this case, only a process with (pI & cap_sys_rawio) can exec()ute
> pulseaudio, let alone use the capability. That is, the filecap +pe
> implies that the capability is required for the app to run, but the
> bounding set suppresses the bit from the file's xattr...! The only way
> that the exec()d program can get this required bit is from the (pI &
> fI), and so only if a process has (pI & cap_sys_rawio) will it be able
> to invoke the program...
Aha! I was missing something. I was thinking that the bounding set was
still governing system-wide despite the fact it was right in front of me
that it wasn't (kernel source, capsh).
This works perfectly and achieves the exact same goal of step-down root
permissions with run-time inheritance-based management.
I guess we can bin the patch since I doubt xattr-less filesystems are
worth the change. (I might whip up a stackable one just to avoid dealing
with symlinks and loopbacks :)
Thanks for working through this with me. Sorry that it took a few
rounds.
cheers!
will
next prev parent reply other threads:[~2009-08-17 16:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-14 4:15 Will Drewry
2009-08-14 13:32 ` Serge E. Hallyn
2009-08-14 15:40 ` Will Drewry
2009-08-15 17:22 ` Andrew G. Morgan
2009-08-16 4:24 ` Will Drewry
2009-08-17 4:50 ` Andrew G. Morgan
2009-08-17 14:38 ` Will Drewry
2009-08-17 15:26 ` Andrew G. Morgan
2009-08-17 16:48 ` Will Drewry [this message]
2009-08-18 0:30 ` Andrew G. Morgan
2009-08-18 14:07 ` David Howells
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=2359eed20908170948p6612b075mc245aa4fb92e76aa@mail.gmail.com \
--to=redpig@dataspill.org \
--cc=dhowells@redhat.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=morgan@kernel.org \
--cc=serue@us.ibm.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®