All of lore.kernel.org
 help / color / mirror / Atom feed
* neverallow rules and self negation
@ 2015-11-08  4:29 Nick Kralevich
  2015-11-09 14:28 ` Stephen Smalley
  2015-11-09 14:30 ` James Carter
  0 siblings, 2 replies; 5+ messages in thread
From: Nick Kralevich @ 2015-11-08  4:29 UTC (permalink / raw)
  To: SELinux

Consider the following rules:

  attribute foo;
  type asdf, foo;
  type asdf2, foo;
  allow asdf self:dir search;
  neverallow foo { foo -self }:dir search;

This particular policy fails to compile with the following error:

libsepol.report_failure: neverallow on line XXX of XXX (or line XXX of
policy.conf) violated by allow asdf asdf:dir { search };
libsepol.check_assertions: 1 neverallow failures occurred

The intent of the neverallow rule is to prohibit cross domain access
to some resource, but allow access within the same domain. Something
like:

  neverallow asdf { foo -asdf }:dir search;
  neverallow asdf2 { foo -asdf2 }:dir search;

1) Is the behavior described above a bug or working as intended?
2) Is there a way to write a neverallow rule where the target uses
"-self", and if so, what does it mean?

-- 
Nick Kralevich | Android Security | nnk@google.com | 650.214.4037

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-11-13 15:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-08  4:29 neverallow rules and self negation Nick Kralevich
2015-11-09 14:28 ` Stephen Smalley
2015-11-09 14:30 ` James Carter
2015-11-12 20:07   ` Nick Kralevich
2015-11-13 15:30     ` Joshua Brindle

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.