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

VM description #899

Open
marmarek opened this Issue Mar 8, 2015 · 23 comments

Comments

@marmarek
Member

marmarek commented Mar 8, 2015

Reported by Oleg Artemiev grey olli on 12 Sep 2014 08:14 UTC
It could be usefull to have a text description for a VM in its
properties to document changes/difference.
https://groups.google.com/d/topic/qubes-users/uYCcOqIeF5k/discussion

Migrated-From: https://wiki.qubes-os.org/ticket/899

@marmarek marmarek added this to the Release 2.1 (post R2) milestone Mar 8, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Modified by marmarek on 12 Sep 2014 08:14 UTC

Member

marmarek commented Mar 8, 2015

Modified by marmarek on 12 Sep 2014 08:14 UTC

@marmarek marmarek added enhancement and removed bug labels Mar 8, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by joanna on 12 Sep 2014 09:25 UTC
Would be more logical to do that in R3, as part of our qubes.xml revamping.

Member

marmarek commented Mar 8, 2015

Comment by joanna on 12 Sep 2014 09:25 UTC
Would be more logical to do that in R3, as part of our qubes.xml revamping.

@marmarek marmarek modified the milestones: Release 3, Release 2.1 (post R2) Mar 8, 2015

@marmarek marmarek modified the milestones: Release 4.0, Release 3.0 May 13, 2015

@Jeeppler

This comment has been minimized.

Show comment
Hide comment

I would like to work on this issue (see https://groups.google.com/forum/#!topic/qubes-devel/t32l-0BjlLs).

@bnvk bnvk referenced this issue Mar 23, 2016

Closed

Implement a more intuitive Qubes Manager #1870

1 of 12 tasks complete
@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 23, 2016

Member

@bnvk is working on new Qubes Manager, please coordinate.

Member

marmarek commented Mar 23, 2016

@bnvk is working on new Qubes Manager, please coordinate.

@Jeeppler

This comment has been minimized.

Show comment
Hide comment
@Jeeppler

Jeeppler Jul 26, 2016

Is this still relevant, after decomposing the Qubes Manager? How would it look like? Would it be something like a qvm-description tool? I would love to have a VM description.

Jeeppler commented Jul 26, 2016

Is this still relevant, after decomposing the Qubes Manager? How would it look like? Would it be something like a qvm-description tool? I would love to have a VM description.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Jul 26, 2016

Member

On Tue, Jul 26, 2016 at 02:10:35PM -0700, Jeppler wrote:

Is this still relevant, after decomposing the Qubes Manager? How would it look like? Would it be something like a qvm-description tool? I would love to have a VM description.

I think this may be simply a VM property, accessible using qvm-prefs.
How to present it in GUI is unrelated to this ticket.

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?

Member

marmarek commented Jul 26, 2016

On Tue, Jul 26, 2016 at 02:10:35PM -0700, Jeppler wrote:

Is this still relevant, after decomposing the Qubes Manager? How would it look like? Would it be something like a qvm-description tool? I would love to have a VM description.

I think this may be simply a VM property, accessible using qvm-prefs.
How to present it in GUI is unrelated to this ticket.

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?

@Jeeppler

This comment has been minimized.

Show comment
Hide comment
@Jeeppler

Jeeppler Jul 26, 2016

Perfect. @marmarek are you considering to implement it as qvm-prefs property in Q R4?

Perfect. @marmarek are you considering to implement it as qvm-prefs property in Q R4?

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Jul 30, 2016

Member

It's worth thinking about how this is related to #865, i.e., defining and disambigutating these possible properties of VMs:

  • Description
  • Tag
  • Attribute
Member

andrewdavidwong commented Jul 30, 2016

It's worth thinking about how this is related to #865, i.e., defining and disambigutating these possible properties of VMs:

  • Description
  • Tag
  • Attribute
@Jeeppler

This comment has been minimized.

Show comment
Hide comment
@Jeeppler

Jeeppler Aug 4, 2016

I would like to see "Tags" the plural form to do something like: -dev -> tags: work, project

It would be nice to have a "last started" property. This would be helpful to see if the machines are used regularly or have been used a long time ago.

Jeeppler commented Aug 4, 2016

I would like to see "Tags" the plural form to do something like: -dev -> tags: work, project

It would be nice to have a "last started" property. This would be helpful to see if the machines are used regularly or have been used a long time ago.

@Jeeppler

This comment has been minimized.

Show comment
Hide comment
@Jeeppler

Jeeppler Aug 4, 2016

What would be the "Attribute" property? It seems a little bit generic.

Jeeppler commented Aug 4, 2016

What would be the "Attribute" property? It seems a little bit generic.

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Aug 5, 2016

Member

Yes, "last started" would be useful, especially when trying to decide whether a VM needs to be included in a backup. (If the "last started" date is the same or earlier than the "last backup" date, then it probably doesn't need to be backed up again.)

But this is different from a "VM description," so here's a new issue for it: #2230

Member

andrewdavidwong commented Aug 5, 2016

Yes, "last started" would be useful, especially when trying to decide whether a VM needs to be included in a backup. (If the "last started" date is the same or earlier than the "last backup" date, then it probably doesn't need to be backed up again.)

But this is different from a "VM description," so here's a new issue for it: #2230

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Aug 6, 2016

Member

I would like to see "Tags" the plural form to do something like: -dev -> tags: work, project

Yes, that's how it is in Qubes 4.0.

What would be the "Attribute" property? It seems a little bit generic.

That's generic name for tag with some value (so, not only "present"/"absent") ;)

Member

marmarek commented Aug 6, 2016

I would like to see "Tags" the plural form to do something like: -dev -> tags: work, project

Yes, that's how it is in Qubes 4.0.

What would be the "Attribute" property? It seems a little bit generic.

That's generic name for tag with some value (so, not only "present"/"absent") ;)

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 31, 2017

Member

Some thoughts about "VM description" feature - it would be useful to allow free-form text, possibly with some non-ASCII characters, multiple lines, etc. So I take back the idea of putting it in qvm-prefs (and consequently in qubes.xml), as it may lead to some troubles (qvm-prefs don't support multi-line values for example). IMO much better store it as a simple description.txt file in VM directory (/var/lib/qubes/appvms/name-of-vm/description.txt). And in preparation for GUI domain - have some qrexec services to access it (qubes.DescriptionGet, qubes.DescriptionSet). For now, those services would be called from dom0 (this is where qubes-manager is running) to dom0.

Member

marmarek commented Mar 31, 2017

Some thoughts about "VM description" feature - it would be useful to allow free-form text, possibly with some non-ASCII characters, multiple lines, etc. So I take back the idea of putting it in qvm-prefs (and consequently in qubes.xml), as it may lead to some troubles (qvm-prefs don't support multi-line values for example). IMO much better store it as a simple description.txt file in VM directory (/var/lib/qubes/appvms/name-of-vm/description.txt). And in preparation for GUI domain - have some qrexec services to access it (qubes.DescriptionGet, qubes.DescriptionSet). For now, those services would be called from dom0 (this is where qubes-manager is running) to dom0.

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Mar 31, 2017

Member

Would that be a potential attack vector in conjunction with qvm-export? (If descrption.txt isn't somehow sanitized.)

Member

andrewdavidwong commented Mar 31, 2017

Would that be a potential attack vector in conjunction with qvm-export? (If descrption.txt isn't somehow sanitized.)

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 31, 2017

Member

What do you have in mind? Trying to exploit archive format from inside of included file? That archive tool should be resistant against such attacks because it needs to include also private.img, which is fully controlled by the VM.

Member

marmarek commented Mar 31, 2017

What do you have in mind? Trying to exploit archive format from inside of included file? That archive tool should be resistant against such attacks because it needs to include also private.img, which is fully controlled by the VM.

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Mar 31, 2017

Member

Well, we disallow rendering non-ASCII text in dom0 window titles by default, since window title content is potentially adversary-controlled and therefore presents a potential attack vector against dom0. IIUC, qvm-export is meant to allow importing potentially untrusted VMs. But if we allow non-ASCII characters in description.txt, which also gets imported and rendered in dom0, then we've reintroduced adversary-controlled non-ASCII text rendered in dom0. Is that a problem?

Member

andrewdavidwong commented Mar 31, 2017

Well, we disallow rendering non-ASCII text in dom0 window titles by default, since window title content is potentially adversary-controlled and therefore presents a potential attack vector against dom0. IIUC, qvm-export is meant to allow importing potentially untrusted VMs. But if we allow non-ASCII characters in description.txt, which also gets imported and rendered in dom0, then we've reintroduced adversary-controlled non-ASCII text rendered in dom0. Is that a problem?

@Jeeppler

This comment has been minimized.

Show comment
Hide comment
@Jeeppler

Jeeppler Apr 1, 2017

@marmarek it would be useful to allow free-form text, possibly with some non-ASCII characters, multiple lines, etc. yes, I absolutely agree with you.

@andrewdavidwong I assume the reason for only allowing rendering a specific subset of ASCII characters has to do with technical limitations of the window manager.

I would like to have Unicode (UTF-8) support. Unicode (UTF-8) allows to write text and words in almost all languages and is not limited to English.

Jeeppler commented Apr 1, 2017

@marmarek it would be useful to allow free-form text, possibly with some non-ASCII characters, multiple lines, etc. yes, I absolutely agree with you.

@andrewdavidwong I assume the reason for only allowing rendering a specific subset of ASCII characters has to do with technical limitations of the window manager.

I would like to have Unicode (UTF-8) support. Unicode (UTF-8) allows to write text and words in almost all languages and is not limited to English.

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Apr 1, 2017

Member

@andrewdavidwong I assume the reason for only allowing rendering a specific subset of ASCII characters has to do with technical limitations of the window manager.

I would like to have Unicode (UTF-8) support. Unicode (UTF-8) allows to write text and words in almost all languages and is not limited to English.

No, it's not a technical limitation. Rather, UTF-8 in window titles is disabled by default as a security measure for the reasons I mentioned above. If you like, you can enable UTF-8 in window titles by setting allow_utf8_titles = true, either globally or on a per-VM basis, in /etc/qubes/guid.conf in dom0.

Member

andrewdavidwong commented Apr 1, 2017

@andrewdavidwong I assume the reason for only allowing rendering a specific subset of ASCII characters has to do with technical limitations of the window manager.

I would like to have Unicode (UTF-8) support. Unicode (UTF-8) allows to write text and words in almost all languages and is not limited to English.

No, it's not a technical limitation. Rather, UTF-8 in window titles is disabled by default as a security measure for the reasons I mentioned above. If you like, you can enable UTF-8 in window titles by setting allow_utf8_titles = true, either globally or on a per-VM basis, in /etc/qubes/guid.conf in dom0.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Apr 1, 2017

Member

But if we allow non-ASCII characters in description.txt, which also gets imported and rendered in dom0, then we've reintroduced adversary-controlled non-ASCII text rendered in dom0. Is that a problem?

Ah, indeed this may be a problem. I see a few options:

  • don't import description.txt as part of the VM importing
  • strip it of dangerous characters (which also will include <, & etc, to avoid triggering some HTML or other parsers)
Member

marmarek commented Apr 1, 2017

But if we allow non-ASCII characters in description.txt, which also gets imported and rendered in dom0, then we've reintroduced adversary-controlled non-ASCII text rendered in dom0. Is that a problem?

Ah, indeed this may be a problem. I see a few options:

  • don't import description.txt as part of the VM importing
  • strip it of dangerous characters (which also will include <, & etc, to avoid triggering some HTML or other parsers)
@rootkovska

This comment has been minimized.

Show comment
Hide comment
@rootkovska

rootkovska Apr 1, 2017

Member
  1. I like keeping description as a separate file, not to pollute the XML file.

  2. I think coming up with a general method to sanitize description would be tricky. We don't know what widget/application will finally want to display it. This is potentially much harder to reasonable sanitation of titlebars.

  3. So, instead, I would go for ignoring it while... well that's the challenge: we can't just say: ignore it only for imported VMs (restoring VMs previously qvm-exported by someone else), while retain for those imported from a backup, easily. Can we?

  4. We should aim at treating any qvm-backup-restore operation as potentially untrusted. The ultimate goal for qvm-backup-restore should be that, even if the backup was made on a compromised Qubes system, than the new system (where we restoring to) should not get compromised -- i.e. neither Dom0, nor the hypervisor, and firmware, etc, should not be affected (this of course assumes the user opting out from restoring the Dom0 home dir, which often can be used with minimal PITA).

BTW just to double check, @andrewdavidwong: the scenario you really mean is qvm-backup-restore importing a previously qvm-exported (by someone else) VM, correct?

Member

rootkovska commented Apr 1, 2017

  1. I like keeping description as a separate file, not to pollute the XML file.

  2. I think coming up with a general method to sanitize description would be tricky. We don't know what widget/application will finally want to display it. This is potentially much harder to reasonable sanitation of titlebars.

  3. So, instead, I would go for ignoring it while... well that's the challenge: we can't just say: ignore it only for imported VMs (restoring VMs previously qvm-exported by someone else), while retain for those imported from a backup, easily. Can we?

  4. We should aim at treating any qvm-backup-restore operation as potentially untrusted. The ultimate goal for qvm-backup-restore should be that, even if the backup was made on a compromised Qubes system, than the new system (where we restoring to) should not get compromised -- i.e. neither Dom0, nor the hypervisor, and firmware, etc, should not be affected (this of course assumes the user opting out from restoring the Dom0 home dir, which often can be used with minimal PITA).

BTW just to double check, @andrewdavidwong: the scenario you really mean is qvm-backup-restore importing a previously qvm-exported (by someone else) VM, correct?

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Apr 1, 2017

Member
Member

marmarek commented Apr 1, 2017

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Apr 2, 2017

Member

BTW just to double check, @andrewdavidwong: the scenario you really mean is qvm-backup-restore importing a previously qvm-exported (by someone else) VM, correct?

If qvm-backup-restore is the tool used to import VMs that have been created (and potentially shared) with the qvm-export-vm tool (#1747), then yes. However, #1747 doesn't specify whether it would be qvm-backup-restore or a new tool, e.g., qvm-import-vm.

Yes, we can simply ignore this file during VM import - this will be a
separate tool, so it can have separate logic for handling this.

Ok, sounds like it would indeed be a new tool (e.g., qvm-import-vm).

Member

andrewdavidwong commented Apr 2, 2017

BTW just to double check, @andrewdavidwong: the scenario you really mean is qvm-backup-restore importing a previously qvm-exported (by someone else) VM, correct?

If qvm-backup-restore is the tool used to import VMs that have been created (and potentially shared) with the qvm-export-vm tool (#1747), then yes. However, #1747 doesn't specify whether it would be qvm-backup-restore or a new tool, e.g., qvm-import-vm.

Yes, we can simply ignore this file during VM import - this will be a
separate tool, so it can have separate logic for handling this.

Ok, sounds like it would indeed be a new tool (e.g., qvm-import-vm).

@rootkovska

This comment has been minimized.

Show comment
Hide comment
@rootkovska

rootkovska Apr 2, 2017

Member

Yes, we can simply ignore this file during VM import - this will be a
separate tool, so it can have separate logic for handling this.

But the doesn't solve the problem that we still want to have qvm-backup-restore to be resistant to a compromise if the previous system (on which qvm-bakup/qvm-export were run) was compromised.

Perhaps a solution to this would be to add a switch to qvm-backup-restore: e.g. `--distrust-backup", which would imply: 1) don't restore Dom0 homedir, 2) ignore VM description files, 3) perhaps some other things, TBD in another ticket.

And, yes, having a separate qvm-import tool, which always ignores description.txt files.

Member

rootkovska commented Apr 2, 2017

Yes, we can simply ignore this file during VM import - this will be a
separate tool, so it can have separate logic for handling this.

But the doesn't solve the problem that we still want to have qvm-backup-restore to be resistant to a compromise if the previous system (on which qvm-bakup/qvm-export were run) was compromised.

Perhaps a solution to this would be to add a switch to qvm-backup-restore: e.g. `--distrust-backup", which would imply: 1) don't restore Dom0 homedir, 2) ignore VM description files, 3) perhaps some other things, TBD in another ticket.

And, yes, having a separate qvm-import tool, which always ignores description.txt files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment