-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate per-source dispVM #333
Comments
Transcribing relevant gitter chat:
|
A discussion on the Qubes forum might provide some insights on how this may be acomplished. See it here: https://qubes-os.discourse.group/t/opening-more-programs-in-running-disposable-appvm/2389/4 This is a related (community) documentation piece |
Hi all! I've kept this on the back of my mind (it's more than a year later). But I think I've figured out how this can be done properly with the help for some valuable feedback from Qubes community members. This is just a POC. If this gets green light I'd like to leave the hardening of it for someone who knows more than me. In particular, I've addressed the following concern by @emkll:
Now all that is needed it for the The "gist of it"
ImplementationBellow are the VMs where each piece of code would go: sd-viewerThis disposableVM template will need to have the package
Dom0Having a Qubes RPC in dom0 that creates a named diposable VM named after the source code name. It is set to audo-destruct after use. File #!/bin/sh
# TODO Fully sanitize this $1 parameter to make sure it is only a source's code
# name and nothing else. Otherwise sd-app we will have an RCE in dom0
if [ -z "$1" ]; then
# This service requires an argument
exit 1
fi
# create a named disposable VM with the and set it to autodestroy once shut down
/usr/bin/qvm-create --class DispVM sd-viewer-$1 --template=sd-viewer \
--label=red --property auto_cleanup=True
# Give it a tag so we can target the policy from sd-app onto this new VM
/usr/bin/qvm-tags viewer-$1 set sd-viewer-dvm File
File
sd-appThen the currently implemented way of opening files in a
The application doesn't really need to keep track if the named dispVM already exists or not because if it does, the first command will simply fail. ImplicationsThe dispVM that documents is named after the source's code name. This means that any malicious document can be aware of that. Not sure if it can be a vector for any attack, but thought it was worth mentioning. Can easily be eliminated by storing in TODO
|
Thanks for the great write-up, @deeplow. I took this for a spin today, and it's quite promising. Given your detailed description above, I was able to get multiple submissions from a single source to open in the same named DispVM. That certainly greatly improves the time to open a submission after the first. After I manually shut down the VM, it was automatically destroyed, given the My major concern with the proposed change is that the named DispVM does not automatically shut down after all submissions have been closed. I consider that a regression from the current behavior, where DispVMs are automatically shut down and destroyed as soon as a given submission is closed. In the proposed setup, the named DispVM remains running indefinitely. Perhaps we can optimize that behavior. In the forum thread you linked to, there was some discussion of shutting VMs down while idle, but I'm not sure how that would work if submission windows were left open but not interacted with. For reference, here are the changes I implemented based on your write-up:
The first branch, in this repo, includes a new Looking forward to discussing this more with you, @deeplow! Ideally we'd be able to get the VMs to shut down automatically once the submissions are no longer used, then I think we're in a good position to evaluate more seriously. |
Thanks @conorsch for taking a look and implementing it on a testing branch. Looking good! I'll just have to reconfigure the dev environment (as I've been out of touch with the code).
Yes, but from my testing it either takes a long while. But I haven't tested thoroughly or taken a look at the code yet. But I think there might a better way of approaching this: tracking the the number of windows open. The assumption is that the Not sure if "wmctrl", "python-xlib" or another utility is already available in the template, but it is this could be pretty simple. But I don't have so much free time now nor knowledge on window managers, so feel free to take a stab at it if you're interested. Otherwise, I may be able to pick this up at my own pace.
Likewise! |
Not sure if the shipped templates include the
However, putting it in |
For the Qubes AppMenu user testing, we'll be also testing the concept of giving users the option to open things within currently-running VMs. This will be included both in the interview/session script, and in the survey we'll send out for async feedback. Can post thoughts, here, to tangentially inform how desirable that might be. Obviously not the same scenario, but tangential and related. |
Great idea! Looking forward to any ideas on how to convey this to users in a way that is clear. I haven't had any ideas in that direction. it only works well in this specific use-case of the SecureDrop workstation because it pretty much is equivalent to the following two questions:
|
The implementation of this QubesOS/qubes-issues#5557 will likely make the shutdown dynamic trivial to implement since opening applications in the same disposable qube will be natively supported. |
Leaving open for now, it's still relevant. |
Description
Following a conversation on gitter, I'd like to propose the idea of per-source dispVMs. If possible, it would allow us to quickly open any other document for the same source as long as the source's original dispVM is still open
User Research Evidence
No user research has been conducted on this, but I would suggest evaluating the user reaction to the relatively long time it takes to open documents.
User Stories
(made up story)
Comments
Security implications: these will have to be well considered, especially the flows of information.
possibly related issues:
The text was updated successfully, but these errors were encountered: