Re: [PATCH 08/28] SECURITY: Allow kernel services to override LSM settings for task actions [try #2]



On Thu, 2007-12-13 at 17:01 +0000, David Howells wrote:
Stephen Smalley <sds@xxxxxxxxxxxxx> wrote:

They would correspond with the operations provided by the /dev/cachefiles
interface, at the granularity you want to support distinctions to be made.

Can this be made simpler by the fact that /dev/cachefiles has its own unique
label (cachefiles_dev_t).

That lets you control who can use the interface at all, but not what
operations they can invoke on it.

Could just be a single 'setcontext' permission if that is all you want to
control distinctly, or could be a permission per operation.

There is only one operation that makes sense to have a permission: "set
context and begin caching".

All the other operations on a file descriptor attached to /dev/cachfiles are
necessary for there to be a managed cache at all, and given that you've
managed to open /dev/cachefiles that's sufficient access for those, I think.

Do any of the interfaces allow a task to act on a cache other than one
it has created? How does the task identify the desired cache? What if
there is a conflict between multiple tasks asking for the same cache?

If the latter, you don't really need a label for the object, and can
just use the supplied context/secid as the object of the permission
check, ala:
rc = avc_has_perm(tsec->sid, secid, SECCLASS_CACHEFILES,
CACHEFILES__SETCONTEXT);

Ummm. I was under the impression that the target SID had to be a member of
target class.

Not necessarily.

secid is being applied as the acting context for the cachefiles kernel
module, so the above makes sense, even though there isn't really any
"object" in view here. Abstractly, the question we are asking above is:

Can this task set the context of the cachefiles kernel module to this
value?

--
Stephen Smalley
National Security Agency

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: implementing roles in OOP......
    ... > announcement but the Y method name makes no sense in that context. ... > priori knowledge of the structure there is no way for the client to know ... I can imagine an interface that would allow adding Composites ... The example given is exactly the sort of thing that does happen, ...
    (comp.object)
  • TRANSFER arbitrary data ? (long)
    ... subroutine to minimize a function of n variables, ... end interface ... that to an integer array and back. ... subroutine minimize(Func, x, context) ...
    (comp.lang.fortran)
  • Re: [KVM-RFC PATCH 1/2] eventfd: add an explicit srcu based notifier interface
    ... interrupt from eth to host wakes the cpu out of idle, ... softirq-net-rx in interrupt context to NAPI-poll the ethernet ... The interface is just ugly IMO. ... that must support being invoked from atomic-context. ...
    (Linux-Kernel)
  • Re: Creating a "toy" OO/AO language...
    ... That is a major difference between the OO paradigm and procedural/functional paradigms where behavior always dominates the construction. ... In an OO context there are two ways to implement a closure in the functional programming sense of a method that operates on a bounded set of variables. ... The only object that should have an interface to the strategy ... In the OO paradigm one tries to minimize that by limiting it to client and service through peer-to-peer collaboration by eliminating a hierarchical call chains. ...
    (comp.object)
  • Re: testing a dependency on a static function.
    ... "don't use static methods like that." ... example is to create an interface, create a concrete class that ... implements that interface, ... I haven't actually tried to do this in a large project yet, but I think one way around this issue of passing around a lot of small interface objects is to make one single large context object. ...
    (comp.lang.java.help)