threat model
security.md has every key, every check, and the code behind each.
What it stops
- A lost or stolen box. Everything at rest is encrypted. The box boots to nothing useful without a username and a password.
- A hostile session. A program in one session does not read or change another session, dom0, or another world's disk.
- A hostile guest. A fully compromised VM kernel stays in its VMM process, and that process stays in its sandbox.
- Hostile network peers. A session reaches neither the host nor the other sessions, and reaches the LAN only when its config says so.
- Hostile devices. A USB device plugged in after boot does not become a keyboard without your say-so. A GPU or a network card given to a VM does not reach dom0's memory by DMA.
- A hostile backup place. The NAS or the USB disk sees only ciphertext, and cannot change a copy without the box seeing it.
What it does not stop
- Someone who can change the boot partition, and then waits for you to type your password.
- Firmware, microcode, the CPU, or DMA below the IOMMU.
- A compromised dom0 kernel. dom0 is what everything else trusts.
- Someone who has your password.
- A session that takes the whole box down, past the limits its config sets.
How
- Worlds. Each world has its own master key, opened at boot by its username and password. Every image of the world is encrypted under keys only that master opens. Root on the box can erase a world, not read one.
- A signed boot. The boot image is signed with the release key and sealed per world. The loader checks it on every boot. A failure halts.
- An empty host. dom0 holds three programs and refuses a fourth. No daemons, no shell, no login. The compositor runs as its own user under a seccomp filter that refuses every exec. The trusted base is the firmware, the loader, the dom0 kernel, and the root monitor.
- Sessions. A container has its own uid and namespaces, no
capabilities, a seccomp filter, and cgroup limits. A VM runs on
swm-vmm, our own KVM monitor, sandboxed, with a signed guest kernel. - The network. dom0 has no network card driver. The net VM takes the cards whole and runs the router and the firewall. Each session reaches what its config allows, and nothing more.
- USB. New devices are blocked until a real keyboard accepts them. The root monitor remembers a device you accepted and lets it back in without asking.
- Backups. The copies are the ciphertext of your images, with sealed manifests. The place holds no key to them.
- The lock. It shows your world's mark, made from the world's key. A password prompt without your mark is not dom0's.
The limits
The full list is in security.md, section 7.
- No Secure Boot signing. The tree checks the dom0 image, but nothing checks the loader that asks for your password. Whoever can write the boot partition can swap it.
- No anti-rollback. The loader boots any image the release key ever signed, old flaws and all.
- No disk integrity. dm-crypt uses AES-XTS: a change to the ciphertext is not detected.
- Worlds share the data disk's key. A world cannot read another world's images, but it can change or replace them.
- Limited deniability. The decoy fools the person at the prompt, and nothing in its desktop shows another world. A forensic lab is another matter. How many passwords the box takes can be counted off the disk, and every image has a visible header. Give the lab the decoy's password too, and it opens the data disk and finds encrypted images the decoy never uses. It cannot read them or tell whose they are, but it knows they are there.
- The recovery phrase is forever. It cannot be changed or revoked. Whoever has the phrase and the place has the world.
- The compositor decides some things alone: ROM approvals, USB accept, turning points off, input settings, and the unlock decision. A compromised compositor can do them.
- Time and network backups are not authenticated. NTP has no constraint checks. NFS uses no Kerberos and SMB no encryption.
The TOTP codes
On the appliance the TPM holds no disk key. It seals one optional thing: the two TOTP codes. The loader shows the loader code before it asks anything, and a fake loader cannot. That is all they do. They prove the loader is ours. They do not guard the disk, and they do not stop:
- a copy of the disk and a world's password: the disk keys do not go through the TPM;
- someone who can write the boot partition and has any world's password, the decoy's too: they can turn the codes off;
- a boot driver beside the loader, with Secure Boot off: it can read the codes;
- a wrong clock: the clock is not trusted;
- the stick: it opens a world by its password alone.
Enroll on the box's own screen. A serial console keeps the secrets in its log.
byol: you harden it
byol is plain Void Linux with scrotwmos as its desktop. Compared with the appliance:
- Its loader checks nothing it boots. On a password boot, the disk key goes to whatever kernel is on the boot partition.
- No worlds, no A/B slots, no rescue world, no decoy.
- No net VM. The network is the host's, and daemons run.
- A server VM on
lan0is on your LAN, and scrotwmos filters none of its traffic.
Its TPM can open the disk, alone or with the password; the limits of each mode are in security.md, section 5.
Test and nightly keys
A build with RELEASE_KEY=test uses public test keys, and
its loader says ** TEST KEY -- NOT FOR PRODUCTION ** on
every boot. A nightly's says
** NIGHTLY KEY -- NOT A RELEASE **. Neither belongs on a
real box.