Hardening checklist#
shirudo keeps root from loading BPF, changing its state and extending its register. It relies on the kernel and the boot chain for the rest: root with a way to write kernel memory, replace the kernel or talk to the TPM directly goes around every check shirudo makes. This checklist lists what a production target needs beyond System requirements, and says for each item whether shirudo checks it.
The Checked column reads:
init fails: init refuses to bring enforcement up without itwarns: init logs a warning and continuesenforced: shirudo’s LSM programs enforce it themselvesno: nothing in shirudo checks it. Only your build, your boot chain or attestation catch a target without it
Threat model explains the threats behind each item.
Kernel configuration#
Item |
Why |
Checked |
|---|---|---|
Lockdown in integrity mode: optional |
shirudo’s |
no |
Module signatures: |
Without it the kernel loads a module without asking lockdown, and
the module runs in the kernel with no BPF involved. With it,
|
init fails: pre-flight |
|
Limits |
no |
|
The seal acts on file operations. Root writing to the block
device under |
no |
No resume device: no |
Resuming from a hibernation image replaces kernel memory with
what the image holds, and the initrd resumes before |
partly: from |
Kexec |
A kexec boots a kernel and initrd of root’s choosing while the TPM keeps this boot’s register and PCRs. |
enforced: no task loads a kexec image or initramfs, counted as
|
64-bit userspace only: |
shirudo’s LSM programs are written for 64-bit callers. |
no |
|
The kernel checks the config image’s signature only with this option. |
init fails: the config image cannot be mapped |
|
The kernel’s own check of a config’s root signature tries the
built-in trusted keys, the secondary keyring and the platform
keyring before |
no; not needed for configs |
The |
The hook lets shirudo refuse extensions of its register by other processes. |
init fails: |
|
The |
no |
An IOMMU confining device DMA |
A device that root can program, or one plugged in, can otherwise write kernel memory by DMA. |
no |
Kernel command line#
Item |
Why |
Checked |
|---|---|---|
|
Without it, the kernel seals |
init fails |
|
Without it, the kernel seals |
init fails |
|
The LSM programs attach only when the BPF LSM is active. |
init fails: pre-flight |
An authenticated command line, in the signed UKI, that the boot loader cannot replace |
Root who can change the command line can drop the parameters
above, or mask the initrd unit with
|
no |
Boot chain#
Item |
Why |
Checked |
|---|---|---|
A signed UKI that carries the shirudo initrd, booted with Secure Boot and measured boot |
The UKI authenticates the initrd, its bootstrap file and the runtime image’s root hash. |
no |
The |
The PCR 11 value is how a verifier tells a binding made in the initrd from a later one. systemd measures the phase only for a UKI booted through its stub. |
warns: |
No unit seals |
Init must install the keyrings’ restriction itself. |
init fails: the keyring carries a restriction init did not install |
Monitoring for a target that boots without enforcement |
A failed or skipped |
no: |
Only shirudo’s own executables on the runtime image |
Every executable on the runtime image runs with shirudo’s
authority. Never add a shell, a debugger or an interpreter with
|
no |
TPM#
Item |
Why |
Checked |
|---|---|---|
A config PCR that nothing extends after the initrd: not IMA’s PCR, 10 by default, and not PCR 15, which systemd extends with the machine ID, file systems and encrypted volumes |
Any extension of the config PCR after init blocks every command
but |
partly: init refuses PCRs 9, 11 and above 15, and |
A |
A software TPM or another TCTI is for development. |
init fails: an active target refuses any other TCTI |
Custody of the TPM owner password, when the TPM has one |
The password is in the UKI’s initrd and readable by root in the runtime image. |
no |
Protection of the TPM device node |
shirudo opens the TPM by its device path and does not authenticate the answers to its own commands. Evidence that Attest targets verifies is signed by the TPM’s attestation key and does not depend on that path. |
no |
Host files#
Item |
Why |
Checked |
|---|---|---|
|
The timer services read them, and they are host files outside the
signed config. Their variables reach processes with shirudo’s
authority: |
partly: the overrides |
|
|
no |