linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Casey Schaufler <casey@schaufler-ca.com>
To: Andy Lutomirski <luto@kernel.org>, David Howells <dhowells@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	raven@themaw.net, Linux FS Devel <linux-fsdevel@vger.kernel.org>,
	Linux API <linux-api@vger.kernel.org>,
	linux-block@vger.kernel.org, keyrings@vger.kernel.org,
	LSM List <linux-security-module@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>, Jann Horn <jannh@google.com>
Subject: Re: [PATCH 01/10] security: Override creds in __fput() with last fputter's creds [ver #3]
Date: Thu, 6 Jun 2019 12:09:06 -0700	[thread overview]
Message-ID: <e434a62a-d92a-c6e2-cda1-309ac99d4d5c@schaufler-ca.com> (raw)
In-Reply-To: <CALCETrUukxNNhbBAifxz1EADzLOvYKoh9oqqZFJteU+MMhh1ig@mail.gmail.com>

On 6/6/2019 10:18 AM, Andy Lutomirski wrote:
> On Thu, Jun 6, 2019 at 8:06 AM David Howells <dhowells@redhat.com> wrote:
>> Andy Lutomirski <luto@amacapital.net> wrote:
>>
>>>> So that the LSM can see the credentials of the last process to do an fput()
>>>> on a file object when the file object is being dismantled, do the following
>>>> steps:
>>>>
>>> I still maintain that this is a giant design error.
>> Yes, I know.  This was primarily a post so that Greg could play with the USB
>> notifications stuff I added.  The LSM support isn't resolved and is unchanged.
>>
>>> Can someone at least come up with a single valid use case that isn't
>>> entirely full of bugs?
>> "Entirely full of bugs"?
> I can say "hey, I have this policy that the person who triggered an
> event needs such-and-such permission, otherwise the event gets
> suppressed".  But this isn't a full use case, and it's buggy.  It's
> not a full use case because I haven't specified what my actual goal is
> and why this particular policy achieves my goals.  And it's entirely
> full of bugs because, as this patch so nicely illustrates, it's not
> well defined who triggered the event.  For example, if I exec a setuid
> process, who triggers the close?  What if I send the fd to systemd
> over a socket and immediately close my copy before systemd gets (and
> ignores) the message?  Or if I send it to Wayland, or to any other
> process?
>
> A file is closed when everyone is done with it.  Trying to figure out
> who the last intentional user of the file was seems little better than
> random guessing.  Defining a security policy based on it seems like a
> poor idea.
>
>> How would you propose I deal with Casey's requirement?  I'm getting the
>> feeling you're going to nak it if I try to fulfil that and he's going to nak
>> it if I don't.
>>
> Casey, I think you need to state your requirement in a way that's well
> defined, and I think you need to make a compelling case that your
> requirement is indeed worth dictating the design of parts of the
> kernel outside LSM.

Err, no, I don't believe so. There's a whole lot more
going on in this discussion than just what's going on
within the LSMs. Using examples from the LSMs makes it
easier, because their policies are better defined than
the "legacy" policies are. The most important part of the
discussion is about ensuring that the event mechanism
doesn't circumvent the legacy policies. Yes, I understand
that you don't know what that means, or has to do with
anything.



  reply	other threads:[~2019-06-06 19:09 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06  9:41 [RFC][PATCH 00/10] Mount, FS, Block and Keyrings notifications [ver #3] David Howells
2019-06-06  9:42 ` [PATCH 01/10] security: Override creds in __fput() with last fputter's creds " David Howells
2019-06-06 14:57   ` Andy Lutomirski
2019-06-06 15:06   ` David Howells
2019-06-06 17:18     ` Andy Lutomirski
2019-06-06 19:09       ` Casey Schaufler [this message]
2019-06-06 19:34         ` Andy Lutomirski
2019-06-06  9:42 ` [PATCH 02/10] General notification queue with user mmap()'able ring buffer " David Howells
2019-06-06  9:42 ` [PATCH 03/10] keys: Add a notification facility " David Howells
2019-06-06  9:42 ` [PATCH 04/10] vfs: Add a mount-notification " David Howells
2019-06-06  9:42 ` [PATCH 05/10] vfs: Add superblock notifications " David Howells
2019-06-06  9:42 ` [PATCH 06/10] fsinfo: Export superblock notification counter " David Howells
2019-06-06  9:43 ` [PATCH 07/10] Add a general, global device notification watch list " David Howells
2019-06-06  9:43 ` [PATCH 08/10] block: Add block layer notifications " David Howells
2019-06-06  9:43 ` [PATCH 09/10] usb: Add USB subsystem " David Howells
2019-06-06 14:24   ` Alan Stern
2019-06-06 14:33     ` Greg Kroah-Hartman
2019-06-06 14:55       ` Alan Stern
2019-06-06 15:31         ` Greg Kroah-Hartman
2019-06-07  6:40           ` Felipe Balbi
2019-06-07 14:01             ` Alan Stern
2019-06-11  6:28               ` Felipe Balbi
2019-06-11 13:53                 ` Alan Stern
2019-06-12  6:58                   ` Felipe Balbi
2019-06-06  9:43 ` [PATCH 10/10] Add sample notification program " David Howells
2019-06-06 21:21   ` Eugeniu Rosca
2019-06-06 22:52   ` David Howells
2019-06-07 14:37   ` David Howells
2019-06-06 12:32 ` [RFC][PATCH 00/10] Mount, FS, Block and Keyrings notifications " Stephen Smalley
2019-06-06 13:16 ` David Howells
2019-06-06 14:05   ` Stephen Smalley
2019-06-06 16:43     ` Casey Schaufler
2019-06-06 17:11       ` Andy Lutomirski
2019-06-06 18:33         ` Casey Schaufler
2019-06-06 18:51           ` Andy Lutomirski
2019-06-06 17:16       ` Stephen Smalley
2019-06-06 18:56         ` Casey Schaufler
2019-06-06 19:54           ` Andy Lutomirski
2019-06-06 21:17           ` David Howells
2019-06-06 21:54             ` Andy Lutomirski
2019-06-06 22:38             ` David Howells
2019-06-06 22:42               ` Andy Lutomirski
2019-06-06 22:50               ` David Howells
2019-06-06 14:34 ` Christian Brauner

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=e434a62a-d92a-c6e2-cda1-309ac99d4d5c@schaufler-ca.com \
    --to=casey@schaufler-ca.com \
    --cc=dhowells@redhat.com \
    --cc=jannh@google.com \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=raven@themaw.net \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).