Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upedits in DispVM are saved, counter to user expectations #1118
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
unman
Aug 14, 2015
Member
Interesting - the actual behaviour is exactly what I expected it to be when I first used a dispVM.
Clearly "user expectations" differ.
A DispVM allows you to work with files that may be malicious without compromising your sensitive VMs.
I wonder what you thought stage 3 - edit and save would do?
It's the VM that is disposable not the work done in it.
The documentation isn't clear on this, so I'm adding a note to make it so
|
Interesting - the actual behaviour is exactly what I expected it to be when I first used a dispVM. A DispVM allows you to work with files that may be malicious without compromising your sensitive VMs. The documentation isn't clear on this, so I'm adding a note to make it so |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andrewdavidwong
Aug 15, 2015
Member
Three points:
- The behavior @mfc describes was originally described as the intentional behavior regarding changes made to files opened in DispVMs. Unfortunately, I can't find the reference now. (I remember reading this a long time ago, probably in one of Joanna's blog posts.)
- I've tried unsuccessfully to reproduce this behavior in the past, and I still can't reproduce it now. (Perhaps it depends on RPC settings?)
- Personally, it doesn't bother me that I can't seem to reproduce this behavior, since I actually prefer that changes I make to files opened in DispVMs don't get saved back in the original files. Many times, the reason I open a file in a DispVM is precisely so that I can manipulate a disposable version of that file.
|
Three points:
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
mfc
Aug 15, 2015
Member
Thanks for the sharing your perspectives @unman and @aXon. We were unable to find any documentation or blogposts that discussed this aspect of Disposable VMs.
There were five developers/hackers in this discussion, and for every one of them they expected from the language ("Open in Disposable VM") that the file would not be able to modify itself based actions performed in the DispVM. It made them slightly uncomfortable given that if the file is malicious, it should not be able to modify/interact with the non-DispVM.
Also, if there is interaction between the DispVM and the non-DispVM, where is the unspoofable dom0 message of file transfer/editing? And because there is no dom0 notification, does that mean the DispVM has some privileged understanding of the non-DispVM file structure and privileged ability to modify? It's a very different VM interaction than what Qubes users have otherwise.
From a language point of view, maybe the solution is to have a "View in Disposable VM" where no changes can be saved, and then "Edit in Disposable VM" which would make it more clear that the file can be modified back into the non-DispVM.
From my perspective, I would want Disposable VMs to be by default non-networked, unable to edit other VMs, so that if the file opened was malicious it could not exfiltrate any data (whether through the network or by changing metadata etc on the non-DispVM) and it would be deleted upon closing the DispVM window. I just created a new ticket #1121 to discuss the non-networked default aspect.
|
Thanks for the sharing your perspectives @unman and @aXon. We were unable to find any documentation or blogposts that discussed this aspect of Disposable VMs. There were five developers/hackers in this discussion, and for every one of them they expected from the language ("Open in Disposable VM") that the file would not be able to modify itself based actions performed in the DispVM. It made them slightly uncomfortable given that if the file is malicious, it should not be able to modify/interact with the non-DispVM. Also, if there is interaction between the DispVM and the non-DispVM, where is the unspoofable dom0 message of file transfer/editing? And because there is no dom0 notification, does that mean the DispVM has some privileged understanding of the non-DispVM file structure and privileged ability to modify? It's a very different VM interaction than what Qubes users have otherwise. From a language point of view, maybe the solution is to have a "View in Disposable VM" where no changes can be saved, and then "Edit in Disposable VM" which would make it more clear that the file can be modified back into the non-DispVM. From my perspective, I would want Disposable VMs to be by default non-networked, unable to edit other VMs, so that if the file opened was malicious it could not exfiltrate any data (whether through the network or by changing metadata etc on the non-DispVM) and it would be deleted upon closing the DispVM window. I just created a new ticket #1121 to discuss the non-networked default aspect. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
adrelanos
Aug 15, 2015
Member
I also expected the DispVM to not share anything back with the original VM.
So we have 4 use cases here.
- "View in Disposable VM with disabled networking"
- "View in Disposable VM with enabled networking"
- "Edit in Disposable VM with disabled networking"
- "Edit in Disposable VM with enabled networking"
Is there any sane way to support all that UI wise?
Perhaps there could be two entries in the context menu.
- View in Disposable VM
- Edit in Disposable VM
Upon activating that context by the mouse cursor, it could show another layer:
- with networking disabled
- with networking enabled
EDIT: One might also want to distinguish clearnet vs torified networking.
|
I also expected the DispVM to not share anything back with the original VM. So we have 4 use cases here.
Is there any sane way to support all that UI wise? Perhaps there could be two entries in the context menu.
Upon activating that context by the mouse cursor, it could show another layer:
EDIT: One might also want to distinguish clearnet vs torified networking. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
unman
Aug 16, 2015
Member
The behaviour exactly matches that of qvm-open-in-vm, in that a file changed and saved in the other VM is copied back to the originator. The difference is, of course, that it's edited in a disposable VM rather than one of your appVMs. As I said, it's the VM that is disposable, not the work you do in it.
Using this mechanism allows you to safely use potentially malicious files in one of your secure VMs. (This was the original intention as described by Joanna in her blog post. ) There is no need to feel uncomfortable about this: the file is already in your secureVM - you open and edit it in a disposable VM so even if it is malicious, the attack is limited to the disposable VM which will be nuked at the end of your editing, and it ends up back in your secureVM. The threat level is unchanged.
Agreed, there isn't any message about the file transfer: in the normal case, this provides a check against transferring a file to a VM with a different security context to the originator; in the dispVM case, the security context is (by default) the same. If you want to see a message change the policy in qubes.OpenInVm.
Note that this issue arises because of step 3 - edit and save the file. If you don't want the changes to be reflected in the originator don't save them.
Actually, because a dispVM can be used like any other VM there's no reason why you shouldn't save your changes under a new file name, open a term or gui file manager in the dispVM, and copy the new file back to the originator. That way you have the original and your new edited version. (Both, of course, should be considered potentially malicious.)
On the networking question, this was a change in behaviour introduced quite recently(#862). I don't like it, but its easy to set the default netVM for DispVM to none, so it isn't an issue.
|
The behaviour exactly matches that of qvm-open-in-vm, in that a file changed and saved in the other VM is copied back to the originator. The difference is, of course, that it's edited in a disposable VM rather than one of your appVMs. As I said, it's the VM that is disposable, not the work you do in it. Note that this issue arises because of step 3 - edit and save the file. If you don't want the changes to be reflected in the originator don't save them. On the networking question, this was a change in behaviour introduced quite recently(#862). I don't like it, but its easy to set the default netVM for DispVM to none, so it isn't an issue. |
unman
referenced this issue
in QubesOS/qubes-doc
Aug 23, 2015
Merged
Clarified pages on Disposable VMs #29
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Aug 26, 2015
Member
Exactly, this is intended behaviour. If you want to not override
original file, simply don't save the changes, or operate on a copy.
If you think it is still better to have an option to only "view" the
file, not "edit" (in terms of saving changes), as a separate option,
feel free to provide a patch :) But please, not multi-level menu or
other things decreasing usability...
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
|
Exactly, this is intended behaviour. If you want to not override Best Regards, |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
mfc
Aug 26, 2015
Member
thanks @unman for clarifying this behavior in the documentation with QubesOS/qubes-doc#29.
Expected behavior should equal intended behavior, if users constantly need to refer to documentation to understand things then that's bad, because most times users will not realize they are misunderstanding the behavior, and will do unsafe things based on that misunderstanding.
From the language we choose and the context we implement it in they should have clear ideas about functionality. Having a "View in DisposableVM" and "Edit in DisposableVM" would help clarify the functionality of both for the user so that they don't need to refer to the documentation.
I don't think we don't need the additional networking options Patrick suggested since the networking options already exist in the Qubes VM manager advanced tab. I am a big fan of making that functionality more transparent to the user, since I was not aware of it in the Advanced tab. Maybe having an option in the Global Settings for a global default networking choice on DispVMs -- [1] inherit from parent AppVM or [2] non-networked? And then folks can change on an per-AppVM basis as desired.
One tangential question, with "Edit in DisposableVM" if the DispVM can successfully pass back an edited file to the original AppVM, does that mean the DispVM has an understanding of the AppVM name and file structure of the original AppVM?
|
thanks @unman for clarifying this behavior in the documentation with QubesOS/qubes-doc#29. Expected behavior should equal intended behavior, if users constantly need to refer to documentation to understand things then that's bad, because most times users will not realize they are misunderstanding the behavior, and will do unsafe things based on that misunderstanding. From the language we choose and the context we implement it in they should have clear ideas about functionality. Having a "View in DisposableVM" and "Edit in DisposableVM" would help clarify the functionality of both for the user so that they don't need to refer to the documentation. I don't think we don't need the additional networking options Patrick suggested since the networking options already exist in the Qubes VM manager advanced tab. I am a big fan of making that functionality more transparent to the user, since I was not aware of it in the Advanced tab. Maybe having an option in the Global Settings for a global default networking choice on DispVMs -- [1] inherit from parent AppVM or [2] non-networked? And then folks can change on an per-AppVM basis as desired. One tangential question, with "Edit in DisposableVM" if the DispVM can successfully pass back an edited file to the original AppVM, does that mean the DispVM has an understanding of the AppVM name and file structure of the original AppVM? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Aug 26, 2015
Member
On Wed, Aug 26, 2015 at 05:24:33AM -0700, Michael Carbone wrote:
From the language we choose and the context we implement it in they should have clear ideas about functionality. Having a "View in DisposableVM" and "Edit in DisposableVM" would help clarify the functionality of both for the user so that they don't need to refer to the documentation.
Agree.
I don't think we don't need the additional networking options Patrick
suggested since the networking options already exist in the Qubes VM
manager advanced tab.
I think we should keep the UI as simple as possible. Having 2-level, 4+
options for just opening a file in DispVM (plus additional options for
copying/moving the file) doesn't look like a simple solution.
I am a big fan of making that functionality more
transparent to the user, since I was not aware of it in the Advanced
tab. Maybe having an option in the Global Settings for a global
default networking choice on DispVMs -- [1] inherit from parent AppVM
or [2] non-networked? And then folks can change on an per-AppVM basis
as desired.
This would be non trivial in current code base (i.e. before core3,
planned for Qubes 4.0). Generally in the current code global
settings/defaults are rather hacky...
So I guess the way to go is simply change default to have non-networked
DispVMs by default. But I'd ask on ML first.
One tangential question, with "Edit in DisposableVM" if the DispVM can successfully pass back an edited file to the original AppVM, does that mean the DispVM has an understanding of the AppVM name and file structure of the original AppVM?
No, DispVM just send a modified blob and source VM put it in place of
original file. DispVM know the base name and extension of the file,
though (to have it displayed in title bar for example).
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
|
On Wed, Aug 26, 2015 at 05:24:33AM -0700, Michael Carbone wrote:
Agree.
I think we should keep the UI as simple as possible. Having 2-level, 4+
This would be non trivial in current code base (i.e. before core3, So I guess the way to go is simply change default to have non-networked
No, DispVM just send a modified blob and source VM put it in place of Best Regards, |
marmarek
added
enhancement
C: core
labels
Aug 26, 2015
marmarek
added this to the Release 3.0 milestone
Aug 26, 2015
adrelanos
referenced this issue
Aug 26, 2015
Closed
Qubes Attachments not available for Debian, Whonix templates #1140
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andrewdavidwong
Aug 28, 2015
Member
So, does this depend on RPC settings? If so, perhaps we should document that somewhere. As I said above, I cannot reproduce this behavior (i.e., I cannot edit a plain text file in a DispVM and have the changes saved back in the original file), and I'm thinking maybe that's because I've modified my RPC settings.
Also, which file types are (supposed to be) implicated here? Just plain text files?
|
So, does this depend on RPC settings? If so, perhaps we should document that somewhere. As I said above, I cannot reproduce this behavior (i.e., I cannot edit a plain text file in a DispVM and have the changes saved back in the original file), and I'm thinking maybe that's because I've modified my RPC settings. Also, which file types are (supposed to be) implicated here? Just plain text files? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
unman
Aug 28, 2015
Member
@axon-qubes
In my experience this works with all file types. I have seen occasional corruption in docx files edited in libreoffice in a dispVM, but otherwise it works across the board.
I cant see that policy settings would make a difference , but I could be wrong. Which settings have you changed?
|
@axon-qubes |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Sep 1, 2015
Member
@axon-qubes RPC settings shouldn't have anything to do here - either the file is opened in the DispVM (and then changes should be saved back to the source VM), or DispVM wouldn't be started at all. So most likely some bug...
|
@axon-qubes RPC settings shouldn't have anything to do here - either the file is opened in the DispVM (and then changes should be saved back to the source VM), or DispVM wouldn't be started at all. So most likely some bug... |
marmarek
modified the milestones:
Release 3.1,
Release 3.0
Sep 1, 2015
marmarek
modified the milestones:
Release 3.2,
Release 3.1
Feb 8, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
cfcs
Apr 30, 2016
If at some point this moves forward, it might be nice to have it in the VM title (like [disp1:read-only] and [disp1:edit-original]or whatever)
cfcs
commented
Apr 30, 2016
|
If at some point this moves forward, it might be nice to have it in the VM title (like |
adrelanos
referenced this issue
May 12, 2016
Open
Options to set `dispvm_netvm` to 'none' for all VMs and as default #1988
marmarek
modified the milestones:
Release 3.2,
Release 3.2 updates
Nov 19, 2016
added a commit
to marmarek/qubes-core-agent-linux
that referenced
this issue
May 26, 2018
added a commit
to marmarek/qubes-core-agent-linux
that referenced
this issue
May 26, 2018
added a commit
to marmarek/qubes-core-agent-linux
that referenced
this issue
May 26, 2018
added a commit
to marmarek/qubes-core-agent-linux
that referenced
this issue
May 26, 2018
added a commit
to marmarek/qubes-core-agent-linux
that referenced
this issue
May 26, 2018
marmarek
referenced this issue
in QubesOS/qubes-core-agent-linux
May 26, 2018
Merged
qvm-open-in-vm: implement --view-only option #119
marmarek
closed this
in
marmarek/qubes-core-agent-linux@ef557ca
May 27, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
qubesos-bot
May 28, 2018
Automated announcement from builder-github
The package core-agent-linux has been pushed to the r4.0 testing repository for the CentOS centos7 template.
To test this update, please install it with the following command:
sudo yum update --enablerepo=qubes-vm-r4.0-current-testing
qubesos-bot
commented
May 28, 2018
|
Automated announcement from builder-github The package
|
qubesos-bot
added
the
r4.0-centos7-cur-test
label
May 28, 2018
qubesos-bot
referenced this issue
in QubesOS/updates-status
May 28, 2018
Closed
core-agent-linux v4.0.29 (r4.0) #550
qubesos-bot
added
r4.0-buster-cur-test
r4.0-jessie-cur-test
labels
May 28, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
qubesos-bot
May 28, 2018
Automated announcement from builder-github
The package qubes-core-agent_4.0.29-1+deb9u1 has been pushed to the r4.0 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing stretch-testing (or appropriate equivalent for your template version), then use the standard update command:
sudo apt-get update && sudo apt-get dist-upgrade
qubesos-bot
commented
May 28, 2018
|
Automated announcement from builder-github The package
|
qubesos-bot
added
the
r4.0-stretch-cur-test
label
May 28, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
qubesos-bot
May 28, 2018
Automated announcement from builder-github
The component core-agent-linux (including package python2-dnf-plugins-qubes-hooks-4.0.29-1.fc26) has been pushed to the r4.0 testing repository for the Fedora template.
To test this update, please install it with the following command:
sudo yum update --enablerepo=qubes-vm-r4.0-current-testing
qubesos-bot
commented
May 28, 2018
|
Automated announcement from builder-github The component
|
qubesos-bot
added
r4.0-buster-stable
and removed
r4.0-buster-cur-test
r4.0-jessie-cur-test
labels
Jun 12, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
qubesos-bot
Jun 12, 2018
Automated announcement from builder-github
The component core-agent-linux (including package python2-dnf-plugins-qubes-hooks-4.0.30-1.fc26) has been pushed to the r4.0 stable repository for the Fedora template.
To install this update, please use the standard update command:
sudo yum update
qubesos-bot
commented
Jun 12, 2018
|
Automated announcement from builder-github The component
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
qubesos-bot
Jun 13, 2018
Automated announcement from builder-github
The package qubes-core-agent_4.0.30-1+deb9u1 has been pushed to the r4.0 stable repository for the Debian template.
To install this update, please use the standard update command:
sudo apt-get update && sudo apt-get dist-upgrade
qubesos-bot
commented
Jun 13, 2018
|
Automated announcement from builder-github The package
|
qubesos-bot
added
r4.0-stretch-stable
and removed
r4.0-stretch-cur-test
labels
Jun 13, 2018
airelemental
referenced this issue
Jun 17, 2018
Closed
"Open in DisposableVM": Popup to enable insecure settings, like networking #4006
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
qubesos-bot
Jun 29, 2018
Automated announcement from builder-github
The package core-agent-linux has been pushed to the r4.0 stable repository for the Fedora centos7 template.
To install this update, please use the standard update command:
sudo yum update
qubesos-bot
commented
Jun 29, 2018
|
Automated announcement from builder-github The package
|
qubesos-bot
added
r4.0-centos7-stable
and removed
r4.0-centos7-cur-test
labels
Jun 29, 2018
added a commit
to marmarek/qubes-core-agent-linux
that referenced
this issue
Jul 26, 2018
added a commit
to marmarek/qubes-core-agent-linux
that referenced
this issue
Jul 26, 2018
qubesos-bot
added
the
r3.2-buster-cur-test
label
Jul 26, 2018
qubesos-bot
referenced this issue
in QubesOS/updates-status
Jul 26, 2018
Open
core-agent-linux v3.2.32 (r3.2) #617
qubesos-bot
added
the
r3.2-jessie-cur-test
label
Jul 26, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
qubesos-bot
Jul 26, 2018
Automated announcement from builder-github
The package qubes-core-agent_3.2.32-1+deb9u1 has been pushed to the r3.2 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing stretch-testing (or appropriate equivalent for your template version), then use the standard update command:
sudo apt-get update && sudo apt-get dist-upgrade
qubesos-bot
commented
Jul 26, 2018
|
Automated announcement from builder-github The package
|
qubesos-bot
added
r3.2-stretch-cur-test
r3.2-fc25-cur-test
labels
Jul 26, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
qubesos-bot
Jul 26, 2018
Automated announcement from builder-github
The component core-agent-linux (including package python2-dnf-plugins-qubes-hooks-3.2.32-1.fc26) has been pushed to the r3.2 testing repository for the Fedora template.
To test this update, please install it with the following command:
sudo yum update --enablerepo=qubes-vm-r3.2-current-testing
qubesos-bot
commented
Jul 26, 2018
|
Automated announcement from builder-github The component
|
mfc commentedAug 14, 2015
Qubes 3.0RC2
expected behavior: edited text will not be added to original text files in non-DispVM
actual behavior: edited text is added to original text file in non-DispVM
This runs counter to user expectations give that these are called Disposable VMs.
Reported at CCCamp!