-
Notifications
You must be signed in to change notification settings - Fork 1
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
Unintuitive: cow writes to template-controlled block devices #1
Comments
Indeed, this is caused by a As for the warning message, since the The security issue is mitigated on my system, as my whole system pool is encrypted, thus root-cow.img is protected using the same key as the appvm's private. I invite others to, at the very least, encrypt their /var/lib/qubes/appvms folder. |
@ayakael Thanks for the feedback. :) Ah, interesting, that would indeed be nice to implement then, COW with Re: security being mitigated: The encryption mentioned here is there to enable having different groups of VMs encrypted with different keys, so you can have some of them loaded and others not; so it is an issue if data that should be encrypted with the key for I think someone reported that this is fixed in recent Qubes though, but I haven't had time to try to update recently. |
@cfcs No problem, glad to help! Thanks to you, as well! I use ZFS for its native encryption and very elegant secure backup implementation. Till I discovered your work, I was stuck with the far from elegant Re: Security. Quite fair! I'm still trying to get A possible means to circumvent that would be to clone a per-encryption-zone version of the template using 'zfs send | zfs receive' to the zone's import dataset, thus creating a trusted copy of that template for that zone. This woud be expensive time and storage-wise, but would only need to happen on the first run of any VM of that zone, and following that would only need to be incrementally updated when the template changes. I was exploring a more elegant solution, which would involve using As for updated Qubes having fixed the root-cow issue. I can confirm that it isn't the case. I don't think its a bug, but a feature of You'll notice this in qubes.xml if it came out like mine as defaults:
What it should be is this, but that configuration leads to no root volume being created. qubes-qube-manager also likes deleting
|
I'm mistaken. Reference file.py - import_data function
Reference file.py - create_sparse_file
Reference file.py - reset function
Reference file.py - snap vs stop map
|
Thanks for the research, I'm a bit occupied brainspace-wise and can't really take it all in now. I saw you fixed the udev issue where you get one million popups on zvol activation; that was very annoying. Will you send a PR when you have tested your changes? |
When a ZFS-backed VM runs a template backed by e.g. a
File
pool, thecow
for the immutable volume(s) are written using the template's pool, not ZFS.This is pretty terrible for the
zfs_encrypted
target where ephemeral writes to/
(the root volume) will end up in/var/lib/qubes/appvms/myvm/root-cow.img
- unencrypted.Perhaps we should detect and warn about this, e.g. when running a VM where the template does not run from the same pool. OTOH it's not really a solution to require users to have a template -per- zfs group, so...
Anyway, food for thought, leaving it here for now.
The text was updated successfully, but these errors were encountered: