From cf1959647108c13584e502e6f2711efebbee3642 Mon Sep 17 00:00:00 2001 From: Pawel Marczewski Date: Fri, 24 Jan 2020 17:34:25 +0100 Subject: [PATCH] Add policy for qubes.VMExecGUI --- Makefile | 1 + qubes-rpc-policy/qubes.VMExecGUI.policy | 31 +++++++++++++++++++++++++ rpm_spec/core-dom0.spec.in | 1 + 3 files changed, 33 insertions(+) create mode 100644 qubes-rpc-policy/qubes.VMExecGUI.policy diff --git a/Makefile b/Makefile index adfa3152..8816a45f 100644 --- a/Makefile +++ b/Makefile @@ -179,6 +179,7 @@ endif cp qubes-rpc-policy/qubes.VMShell.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.VMShell cp qubes-rpc-policy/qubes.VMRootShell.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.VMRootShell cp qubes-rpc-policy/qubes.VMExec.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.VMExec + cp qubes-rpc-policy/qubes.VMExecGUI.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.VMExecGUI cp qubes-rpc-policy/qubes.NotifyUpdates.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.NotifyUpdates cp qubes-rpc-policy/qubes.NotifyTools.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.NotifyTools cp qubes-rpc-policy/qubes.GetImageRGBA.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.GetImageRGBA diff --git a/qubes-rpc-policy/qubes.VMExecGUI.policy b/qubes-rpc-policy/qubes.VMExecGUI.policy new file mode 100644 index 00000000..9863df8d --- /dev/null +++ b/qubes-rpc-policy/qubes.VMExecGUI.policy @@ -0,0 +1,31 @@ +## Note that policy parsing stops at the first match, +## so adding anything below "$anyvm $anyvm action" line will have no effect + +## Please use a single # to start your custom comments + +$anyvm $dispvm allow +$anyvm $anyvm deny + +# WARNING: The qubes.VMExec service is dangerous and there are really few +# cases when it could be safely used. Especially when policy set to "ask" you +# have no way to know for sure what command(s) will be called. Compromissed +# source VM can substitute the command. Allowing one VM to execute +# qubes.VMExec over the other VM allows the former to TAKE FULL CONTROL over +# the later. In most cases this is not what we want! +# +# Instead we should be using task-specific qrexec services which provide +# assurance as to what program will be responding to the (untrusted) VM +# requests. +# +# It is, however, safe, in most cases, to allow ultimate control of the +# creating AppVM over the DisposableVM it creates as part of the qrexec service +# invocation. That's why by default we have "$anyvm $dispvm allow" rule. Note +# that it does _not_ allow any AppVM to execute qubes.VMExec service over any +# DispVM created in the system -- that would obviously be wrong. It only allows +# qubes.VMExec service access to the AppVM which creates the DispVM as part of +# this very service invocation. +# +# See e.g. this thread for some discussion: +# https://groups.google.com/d/msg/qubes-users/xnAByaL_bjI/3PjYdiTDW-0J +# +# diff --git a/rpm_spec/core-dom0.spec.in b/rpm_spec/core-dom0.spec.in index 6cbeb47d..8a4cae34 100644 --- a/rpm_spec/core-dom0.spec.in +++ b/rpm_spec/core-dom0.spec.in @@ -403,6 +403,7 @@ fi %attr(0664,root,qubes) %config(noreplace) /etc/qubes-rpc/policy/qubes.VMShell %attr(0664,root,qubes) %config(noreplace) /etc/qubes-rpc/policy/qubes.VMRootShell %attr(0664,root,qubes) %config(noreplace) /etc/qubes-rpc/policy/qubes.VMExec +%attr(0664,root,qubes) %config(noreplace) /etc/qubes-rpc/policy/qubes.VMExecGUI %attr(0664,root,qubes) %config(noreplace) /etc/qubes-rpc/policy/qubes.UpdatesProxy %attr(0664,root,qubes) %config(noreplace) /etc/qubes-rpc/policy/qubes.GetDate %attr(0664,root,qubes) %config(noreplace) /etc/qubes-rpc/policy/policy.RegisterArgument