-
-
Notifications
You must be signed in to change notification settings - Fork 53
Description
Qubes OS release
4.1.2
Brief summary
Currently, all VMs based on a particular template inherit its /etc/machine-id, because it is persistent. This has privacy implications.
From machine-id documentation:
"This ID uniquely identifies the host. It should be considered "confidential", and must not be exposed in untrusted environments, in particular on the network. If a stable unique identifier that is tied to the machine is needed for some application, the machine ID or any part of it must not be used directly."
Steps to reproduce
cat /etc/machine-id in template and VMs using it.
Expected behavior
Qubes OS's templates are essentially golden images. As also described in systemd's documentation, "each instance should automatically acquire its own identifying credentials on first boot", i.e. /etc/machine-id must not be shared across qubes.
Actual behavior
All qubes based on a certain template have template's /etc/machine-id.
A simple and effective solution is to run this in the template:
touch /run/machine-id
ln -sfT /run/machine-id /etc/machine-id
sed -ri 's/#Storage=.*/Storage=volatile/g' /etc/systemd/journald.conf
After that, on each boot, the VM will have a new unique machine-id.
The last command ensures that journal will be volatile too (thus, not exercise unnecessary writes to SSDs). Related issue:
Metadata
Metadata
Assignees
Labels
Type
Projects
Status