All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Smalley <sds@tycho.nsa.gov>
To: Xen <xen-devel@lists.xensource.com>
Subject: [PATCH] xen/xsm/flask: Fix permission tables
Date: Wed, 02 Feb 2011 11:43:44 -0500	[thread overview]
Message-ID: <1296665024.26511.14.camel@moss-pluto> (raw)

[-- Attachment #1: Type: text/plain, Size: 897 bytes --]

At some point, it seems that someone manually added Flask permission
definitions to one header file without updating the corresponding policy
configuration or the other related table.  The end result is that we can
get uninterpretable AVC messages like this:
# xl dmesg | grep avc
(XEN) avc:  denied  { 0x4000000 } for domid=0
scontext=system_u:system_r:dom0_t tcontext=system_u:system_r:domU_t
tclass=domain

Fix this by updating the flask config and regenerating the headers from
it.  In the future, this can be further improved by integrating the
automatic generation of the headers into the build process as is
presently done in SELinux.

Signed-off-by:  Stephen Smalley <sds@tycho.nsa.gov>

---

 tools/flask/policy/policy/flask/access_vectors |    2 ++
 xen/xsm/flask/include/av_perm_to_string.h      |    2 ++
 2 files changed, 4 insertions(+)

-- 
Stephen Smalley
National Security Agency

[-- Attachment #2: xen-flask-permission-fix.patch --]
[-- Type: text/x-patch, Size: 1020 bytes --]

diff --git a/tools/flask/policy/policy/flask/access_vectors b/tools/flask/policy/policy/flask/access_vectors
--- a/tools/flask/policy/policy/flask/access_vectors
+++ b/tools/flask/policy/policy/flask/access_vectors
@@ -75,6 +75,8 @@
 	trigger
 	getextvcpucontext
 	setextvcpucontext
+	getvcpuextstate
+	setvcpuextstate
 }
 
 class hvm
diff --git a/xen/xsm/flask/include/av_perm_to_string.h b/xen/xsm/flask/include/av_perm_to_string.h
--- a/xen/xsm/flask/include/av_perm_to_string.h
+++ b/xen/xsm/flask/include/av_perm_to_string.h
@@ -50,6 +50,8 @@
    S_(SECCLASS_DOMAIN, DOMAIN__TRIGGER, "trigger")
    S_(SECCLASS_DOMAIN, DOMAIN__GETEXTVCPUCONTEXT, "getextvcpucontext")
    S_(SECCLASS_DOMAIN, DOMAIN__SETEXTVCPUCONTEXT, "setextvcpucontext")
+   S_(SECCLASS_DOMAIN, DOMAIN__GETVCPUEXTSTATE, "getvcpuextstate")
+   S_(SECCLASS_DOMAIN, DOMAIN__SETVCPUEXTSTATE, "setvcpuextstate")
    S_(SECCLASS_HVM, HVM__SETHVMC, "sethvmc")
    S_(SECCLASS_HVM, HVM__GETHVMC, "gethvmc")
    S_(SECCLASS_HVM, HVM__SETPARAM, "setparam")

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

             reply	other threads:[~2011-02-02 16:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-02 16:43 Stephen Smalley [this message]
2011-04-11 14:15 ` [PATCH] xen/xsm/flask: Fix permission tables Ian Jackson
2011-04-11 14:32   ` Stephen Smalley

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=1296665024.26511.14.camel@moss-pluto \
    --to=sds@tycho.nsa.gov \
    --cc=xen-devel@lists.xensource.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 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.