From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: xen-devel@lists.xenproject.org, dgdegra@tycho.nsa.gov
Subject: Re: XSM permissive by default.
Date: Wed, 9 Mar 2016 16:17:35 -0500 [thread overview]
Message-ID: <20160309211735.GA28919@char.us.oracle.com> (raw)
In-Reply-To: <56E023FF.1020706@citrix.com>
On Wed, Mar 09, 2016 at 01:24:15PM +0000, Andrew Cooper wrote:
> On 09/03/16 01:51, Konrad Rzeszutek Wilk wrote:
> > Hey,
> >
> > I was wondering if it we should change the default flask_bootparam
> > option from permissive to disabled?
> >
> > The reason being is that I was startled to see that my xSplice
> > code was able to patch the hypervisor from within an PV guest!
> >
> > Further testing showed that I could do 'xl debug-keys R' from
> > within the guests. This being possible with released 4.6 if I have
> > XSM enabled.
> >
> > All of this is due to the fact that I had forgotten to load the policy,
> > but Xen just told me:
> >
> > Flask: Access controls disabled until policy is loaded.
> >
> > which is an understatement. I somehow had expected that if no
> > policy was loaded it would revert to the dummy one which has the
> > same permission as the non-XSM build. Ha! What a surprise..
> >
> > Now that the XSM is enabled via config it becomes much more
> > easy to enable it..
> >
> > Or perhaps change the code to flask so that if there are any
s/flask/dummy/
> > errors loading the policy it uses the dummy one?
>
> By the looks of it, "permissive" shouldn't be an available option at all.
>
> If a misconfiguration occurs, the behaviour should revert back to the
> current "dom0 all powerful, everything else unprivileged" state which
> currently exists without XSM.
Looking deeper in the code I believe it should be possible to swap
from the 'flask_ops' to the 'dummy_ops' (which is what you have without
XSM) if there is a failure during booting to load the policy file
(or the person simply forgot to include it).
However it was not clear to me whether changing the ops from dummy_ops
to flask_ops during runtime (When the policy being loaded) would work.
It looks like it should be possible as FLASK_DISABLE does it..
Or whether one can FLASK_LOAD if the ops are dummy_ops instead
of flask_ops.
I will try to spin out a patch for this next week.
>
> ~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-03-09 21:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-09 1:51 XSM permissive by default Konrad Rzeszutek Wilk
2016-03-09 2:11 ` Doug Goldstein
2016-03-09 13:24 ` Andrew Cooper
2016-03-09 21:17 ` Konrad Rzeszutek Wilk [this message]
2016-03-09 22:09 ` Daniel De Graaf
2016-03-10 2:40 ` Doug Goldstein
2016-03-10 17:10 ` Konrad Rzeszutek Wilk
2016-03-10 17:34 ` Doug Goldstein
2016-03-10 17:44 ` Andrew Cooper
2016-03-10 18:30 ` [PATCH] flask: change default state to enforcing Daniel De Graaf
2016-03-10 19:12 ` Konrad Rzeszutek Wilk
2016-03-10 19:37 ` Daniel De Graaf
2016-03-15 14:48 ` Anshul Makkar
2016-03-11 9:07 ` Jan Beulich
2016-03-11 14:58 ` Konrad Rzeszutek Wilk
2016-03-11 15:39 ` Daniel De Graaf
2016-03-11 15:43 ` Jan Beulich
2016-03-11 15:51 ` Daniel De Graaf
2016-04-04 17:12 ` XSM permissive by default Ian Jackson
2016-04-05 8:03 ` Jan Beulich
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=20160309211735.GA28919@char.us.oracle.com \
--to=konrad.wilk@oracle.com \
--cc=andrew.cooper3@citrix.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).