All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: ross.lagerwall@citrix.com, Doug Goldstein <cardoe@cardoe.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: XSM denials with 4.7.0 RC1
Date: Wed, 4 May 2016 11:33:08 -0400	[thread overview]
Message-ID: <20160504153308.GA12701@char.us.oracle.com> (raw)
In-Reply-To: <20160504140538.GB27070@citrix.com>

On Wed, May 04, 2016 at 03:05:38PM +0100, Wei Liu wrote:
> CC Konrad and Ross
> 
> On Wed, May 04, 2016 at 08:52:24AM -0500, Doug Goldstein wrote:
> > Hi all,
> > 
> > Sometime after d4cd5a205973171475b8c63bc250c2803e0f51fa, I get the
> > following denials for any domU that attempts to run "xl". In my
> > situation my domU needs to run "xl devd" because its a driver domain.
> > 
> > (XEN) avc:  denied  { xen_extraversion } for domid=1
> > scontext=system_u:system_r:domU_t tcontext=system_u:system_r:xen_t
> > tclass=version
> > (XEN) avc:  denied  { xen_extraversion } for domid=1
> > scontext=system_u:system_r:domU_t tcontext=system_u:system_r:xen_t
> > tclass=version
> > (XEN) avc:  denied  { xen_compile_info } for domid=1
> > scontext=system_u:system_r:domU_t tcontext=system_u:system_r:xen_t
> > tclass=version
> > (XEN) avc:  denied  { xen_capabilities } for domid=1
> > scontext=system_u:system_r:domU_t tcontext=system_u:system_r:xen_t
> > tclass=version
> > (XEN) avc:  denied  { xen_changeset } for domid=1
> > scontext=system_u:system_r:domU_t tcontext=system_u:system_r:xen_t
> > tclass=version
> > (XEN) avc:  denied  { xen_pagesize } for domid=1
> > scontext=system_u:system_r:domU_t tcontext=system_u:system_r:xen_t
> > tclass=version
> > (XEN) avc:  denied  { xen_commandline } for domid=1
> > scontext=system_u:system_r:domU_t tcontext=system_u:system_r:xen_t
> > tclass=version
> > (XEN) avc:  denied  { xen_build_id } for domid=1
> > scontext=system_u:system_r:domU_t tcontext=system_u:system_r:xen_t
> > tclass=version
> > 
> > I'm guessing a changed happened to xl so that it queries the version
> > info everytime it is run.
> > 
> 
> I think the root cause is that we have now altered xen_version hypercall
> for xsplice.
> 
> We might need to update the hook, the default policy (assuming that's
> what you use) or both.

The policy:
# For normal guests all possible except XENVER_commandline.                     
allow domain_type xen_t:version {                                               
    xen_extraversion xen_compile_info xen_capabilities                          
    xen_changeset xen_pagesize xen_guest_handle                                 
};                                                                              


So not sure why you are seeing those. Did you rebuild your policy against
4.7.0-1rc?

The xen_build_id and xen_commandline should definitly error out per:

a2fc8d514df2b38c310d4f4432fe06520b0769ed
Author: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Date:   Fri Mar 11 21:40:43 2016 -0500

    xsm/xen_version: Add XSM for most of xen_version hypercall

    The subop for XENVER_commandline is now a priviliged operation.
    To not break guests we still return an string - but it is
    just '<denied>\0'.

And the XSM checks would trigger for XENVER_commandline - it just that
instead of -EPERM being returned we return '<denied>\0'.

Is that not the case?



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

  reply	other threads:[~2016-05-04 15:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-04 13:52 XSM denials with 4.7.0 RC1 Doug Goldstein
2016-05-04 13:58 ` Jan Beulich
2016-05-04 14:00   ` Doug Goldstein
2016-05-04 14:05 ` Wei Liu
2016-05-04 15:33   ` Konrad Rzeszutek Wilk [this message]
2016-05-04 17:20 ` Daniel De Graaf
2016-05-04 19:35   ` Doug Goldstein
2016-05-04 19:39     ` Konrad Rzeszutek Wilk
2016-05-04 19:43       ` Doug Goldstein

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=20160504153308.GA12701@char.us.oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=cardoe@cardoe.com \
    --cc=ross.lagerwall@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /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.