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

Minimize dom0 #8658

Closed
emanruse opened this issue Oct 26, 2023 · 5 comments
Closed

Minimize dom0 #8658

emanruse opened this issue Oct 26, 2023 · 5 comments
Labels
P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. R: declined Resolution: While a legitimate bug or proposal, it has been decided that no action will be taken. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.

Comments

@emanruse
Copy link

The problem you're addressing (if any)

As of Qubes OS 4.1.2, dom0 is not as minimal (optimal) as it could be. For a security focused OS, this is an open door for various issues capable to affect the system through system updates. There is quite a lot of software which is never used. Example:

root@dom0:~ # dnf list --installed *firmware* | sed -r 's/ {2,}.*//g'
Installed Packages
alsa-sof-firmware.noarch
amd-gpu-firmware.noarch
intel-gpu-firmware.noarch
linux-firmware.noarch
linux-firmware-whence.noarch
nvidia-gpu-firmware.noarch

This is on a system with no NVIDIA or AMD hardware, yet this firmware (which IIUC is certainly proprietary) is there by default (not installed by me explicitly). Additionally, image processing libraries (like LibRaw) are installed in dom0 (as dependencies) etc.

All this is quite concerning in terms of security and doesn't quite match the advises regarding minimizing the attack surface.

fedora-38-xfce is 5.7 GiB.
fedora-38-minimal is 2.6 GiB.
debian-12-minimal is 1.4 GiB.
dom0 is 7.2 GiB.

The solution you'd like

(Options for) minimal/minimized dom0.
Ideally, with a GUI domain, separate from dom0.

During installation, provide options to install software necessary only for existing hardware.

For hardware which does not exist on the system, provide options not to install drivers and firmware for it during initial installation.

For hardware which the user may use in future (but is not present all the time), provide convenient way to install necessary software at a later time, ideally in a temporary, isolated way, so that when the hardware is no longer on the system, the software for it can be easily disabled/removed too.

Reduce proprietary software existence on the system to the possible minimum.

(Perhaps have options to) base dom0 on other, non-Fedora, templates (e.g. Debian minimal?) explaining to the user the pros and cons.

The value to a user, and who that user might be

  • Minimize dom0's vulnerability to potential (security) issues entering it through various libraries and dependencies.

  • Save storage space and network bandwidth (hence also update times) by not installing (and updating) GiB of unnecessary stuff.

https://forum.qubes-os.org/t/how-to-minimize-dom0/20945/

@emanruse emanruse added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality. labels Oct 26, 2023
@marmarek
Copy link
Member

As long as GUI in dom0 is supported, minimal dom0 is not a goal. And especially selecting dom0 packages to specific hardware you install on is not a goal. Moving a disk from one system to another is a thing, and it should work.
Of course, you are free to customize your system as you like, but we are not going to maintain several flavors of dom0 in the installer, at least not until GUI domain is fully supported (progress is tracked here).
BTW, firmware files just being present in dom0 filesystem do nothing if the driver for them isn't loaded. And it isn't loaded if you don't have related hardware. There is no security benefit from removing those files, but if you like you can save some disk space this way.

@marmarek marmarek closed this as not planned Won't fix, can't repro, duplicate, stale Oct 26, 2023
@emanruse
Copy link
Author

emanruse commented Oct 26, 2023 via email

@emanruse
Copy link
Author

emanruse commented Oct 29, 2023 via email

@andrewdavidwong
Copy link
Member

The link (https://github.com/orgs/QubesOS/projects/15) works for me, even in a browser that's not logged into GitHub.

@andrewdavidwong andrewdavidwong added the R: declined Resolution: While a legitimate bug or proposal, it has been decided that no action will be taken. label Oct 29, 2023
@emanruse
Copy link
Author

emanruse commented Jan 12, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. R: declined Resolution: While a legitimate bug or proposal, it has been decided that no action will be taken. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.
Projects
None yet
Development

No branches or pull requests

3 participants