Re: [PATCH 2/3] CRED: Split the task security data and move part of it into struct cred

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Howells <dhowells@...>, <casey@...>
Cc: <dhowells@...>, <viro@...>, <hch@...>, <Trond.Myklebust@...>, <sds@...>, <linux-kernel@...>, <selinux@...>, <linux-security-module@...>
Date: Thursday, September 20, 2007 - 12:31 pm

--- David Howells <dhowells@redhat.com> wrote:


Could you use "object context" instead of "victimisation context"?
It would be in better keeping with traditional security jargon.


That would be for the LSM to decide, not the file system. While I
concede that it is unlikely that you are going to want to use the
same security attributes for your "object" and your "subject" I also
suggest that it is probable that the "object" attributes will want to
change in the case of an filesystem daemon as well, and that the
filesystem code by itself can't know what's correct.


Assuming that the LSM goes along with the notion you could do that
with a task struct, too.


You're making a big mess (that's my opinion, take it for what it's worth)
throughout the LSMs to deal with a single (or maybe a very few) special
case.


Glad I figured it out.


So it sounds like what you'd be happiest with would be a separate task
struct hand crafted to he the right "object" and "subject" attributes.
Couldn't you set up a task to do the overridden operations? Yes, it
would have it's own set of ugly, but it would be isolated. I haven't
been through the code of late, but this used to be what nfsd did, that
being nothing except loaning it's attributes (ok, it was a cred) to
whoever needed them.


Yes, but the LSM writer now has to maintain two full security blobs
even if the system doesn't want cachefs or nfs.


You could have done the same thing passing the task instead of a cred.


Yup. And I'm reluctantly withdrawing my objection to exporting secid's
across the LSM interface. I didn't like 'em when I saw 'em in 1988 in
the SecureWare CMW, and I don't like 'em any better now, but I had three
tries at extracting them from use outside the SELinux specific code and
it's clear that there's no way to do it without being Linus. For Smack
I have restructured a couple lists and can deal with secid's now.

I don't see any way to get around the LSM being involved, even with
secid's. Only the LSM can decide what is appropriate for an override
value. Maybe all you need is

    int security_task_godlikesecid(u32 *secid)

which gives you the fully protected, all powerfull secid. That doesn't
handle capabilities, of course, but It appears you know how to deal with
those already.

I appologize that I can't offer a complete alternative at this point,
but I do have other fish on the barbie right now. Thank you for your
attention to my concerns.




Casey Schaufler
casey@schaufler-ca.com
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/3] Introduce credential record, David Howells, (Wed Sep 19, 12:17 pm)
[PATCH 1/3] CRED: Introduce a COW credentials record, David Howells, (Wed Sep 19, 12:17 pm)
Re: [PATCH 2/3] CRED: Split the task security data and move ..., Casey Schaufler, (Thu Sep 20, 12:31 pm)