Skip to content
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

Make dom0 read-only #5777

Open
zaoqi opened this issue Apr 17, 2020 · 3 comments
Open

Make dom0 read-only #5777

zaoqi opened this issue Apr 17, 2020 · 3 comments
Labels
C: other P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. security This issue pertains to the security of Qubes OS.

Comments

@zaoqi
Copy link

zaoqi commented Apr 17, 2020

Describe the solution you'd like
make dom0 readonly. Build a customized readonly rootfs instead of using Fedora.

Where is the value to a user, and who might that user be?
Make QubesOS more secure

Relevant documentation you've consulted
https://www.qubes-os.org/news/2020/03/18/gui-domain/

Because the GUI will be separated from dom0, users no longer need to modify the files of dom0

@zaoqi zaoqi added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: enhancement labels Apr 17, 2020
@w1k1n9cc
Copy link

Maybe it's possible to adapt fedora silverblue for that purpose.

@andrewdavidwong andrewdavidwong added C: other security This issue pertains to the security of Qubes OS. labels Apr 21, 2020
@andrewdavidwong andrewdavidwong added this to the Far in the future milestone Apr 21, 2020
@andrewdavidwong
Copy link
Member

At one point, the devs mentioned the possibility of having a "completely sealed" dom0 that users can't even directly interact with, so they've certainly considered this.

@andrewdavidwong andrewdavidwong changed the title make dom0 readonly Make dom0 read-only Oct 27, 2022
@tlaurion
Copy link
Contributor

When comparing two root snapshots per

[user@dom0 ~]$ cat /lib/systemd/system-shutdown/root-autosnap 
#!/bin/sh

#This permits wyng-backup to backup root-autosnap and root-autosnap-back, taken at each system shutdowns like any other QubesOS LVMs.
#This also permits to restore to different states of dom0 from Heads and compare dom0 between reboots

#TODO: backup /boot content into a LVM and apply same logic, corresponding to each dom0 snapshots
#https://github.com/tasket/wyng-backup/issues/63

#We delete the backup of last shutdown snapshot (last last shutdown)
/usr/sbin/lvremove --noudevsync --force -An qubes_dom0/root-autosnap-back || true
#We take a snapshot of root-autosnap into root-autosnap-back
/usr/sbin/lvcreate --noudevsync --ignoremonitoring -An -pr -s qubes_dom0/root-autosnap -n root-autosnap-back
#We remove root-autosnap
/usr/sbin/lvremove --noudevsync --force -An qubes_dom0/root-autosnap || true
#We create root-autosnap from root
/usr/sbin/lvcreate --noudevsync --ignoremonitoring -An -pr -s qubes_dom0/root -n root-autosnap

And then we compare the content of the filesystems, we see that:

  • /etc/libvirt/libxl
  • /etc/lvm
  • /etc/xdg/adjtime
  • /home
  • /root
  • /var

Would need to be out of root fs to be able to have a RO QubesOS dom0 with dmverity

Originally posted by @tlaurion in #4371 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: other P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. security This issue pertains to the security of Qubes OS.
Projects
None yet
Development

No branches or pull requests

4 participants