System requirements#
What the target, the operator host and the host that builds the target
binary need. A missing requirement fails the build, shirudo init or
the load. shirudo has no compatibility mode and no fallback for an older
kernel.
Architectures#
Architecture |
Notes |
|---|---|
x86-64 |
Target and operator. The test VM runs on x86-64 hosts. Targets
need upstream commit |
arm64 |
Target and operator. The test VM runs on arm64 hosts. |
riscv64 |
Target and operator. The build applies the hardening flags that exist for riscv64. No test VM runs on riscv64. |
All three are little-endian, the byte order of the .upatch container.
Arch support compares how far each architecture is tested and what the kernel supports on it.
Target kernel#
The target runs a bpf-next kernel with the signed-loader ABI. A release
number does not identify such a kernel: development trees report the
release they follow (the test kernel reports 7.4.0-rc1-bpf-next+), and
the ABI and the patches below decide whether shirudo works on it.
Kernel source#
Component |
Requirement |
|---|---|
bpf-next |
The signed-loader ABI: |
Upstream commit |
|
Upstream commit |
|
|
Adds the |
BPF LSM xattr reads |
Lets an LSM program read a |
Sleepable inode hooks |
Lets a sleepable LSM program attach to |
Trusted |
Lets an LSM program pass |
|
Adds the |
Carried kernel patches describes the required changes and
their status. testing/kernel/ carries the patches and builds the
test kernel artifacts. The shirudo-dev/kernel repository builds the production kernel
artifacts.
Identify the kernel#
Record the source commit and patches from the kernel build artifact’s
<name>-kernel-buildmetadata file.shirudo init --check-onlychecks the ABI of the running kernel from its BTF (signed_loader_kernel_abi). A load on a kernel without it fails withkernel_abi_unsupported. It also checks that the kernel has every LSM hook the embedded programs attach to (kernel_lsm_hooks), and names the hooks a kernel built without the kernel project patch set lacks.The test harness uses the pinned artifact built from
testing/kernel/.
Kernel configuration#
shirudo needs every option below. The CI kernel configuration sets these options and additional ones that the tests use.
Option |
Reason |
|---|---|
|
The |
|
BPF trampolines, through which the LSM programs and |
|
Every admission gate, guard and the seal are BPF LSM programs.
Without |
|
|
|
|
|
The kernel installs a trampoline on an ftrace-managed function as an ftrace direct call and refuses the attach without direct-call support. |
|
|
|
The |
|
|
|
Verification of the detached PKCS#7 signature of a loader at
|
|
ML-DSA-87 certificates and signatures, the only kind shirudo
produces. Without it |
|
The signed-attributes digest that OpenSSL 3.x adds to an ML-DSA
signature. |
|
The |
|
|
|
The runtime and config images are mapped as dm-verity devices: verity format 1, SHA-256, 4096-byte blocks. |
|
The kernel verifies the signed root hash of a config image. The
|
|
The image files are attached to loop devices. |
|
The images are ext4 file systems, mounted read-only. |
Security extended attributes on the file system of
|
The seal labels writable state with |
|
|
shirudo init also refuses a kernel that builds modules
(CONFIG_MODULES) without CONFIG_MODULE_SIG: it loads an unsigned
module without asking the LSM. The pre-flight check
module_signatures tells that from the kernel’s BTF, not from
/proc/config.gz.
Hardening checklist lists the options the trust model assumes
beyond this table, CONFIG_COMPAT and others, why kernel lockdown is
not among them, and why the dm-verity root-hash check accepting keys of
the kernel’s other keyrings does not let them sign a config.
Kernel command line#
Parameter |
Reason |
|---|---|
|
The kernel leaves the |
|
The same for the |
|
Only when |
shirudo-gen-initrd --print-cmdline prints the two keyring parameters.
In production the command line is part of the signed unified kernel
image. See Boot integration.
Attach points for upatches#
shirudo runs without these options. They decide where the upatches a
fleet runs can attach. fentry, fexit, lsm and tp_btf
upatches need nothing beyond the table above. A upatch whose attach
point is missing fails to load.
Option |
Enables |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Attach kinds describes each attach kind.
TPM#
Requirement |
Reason |
|---|---|
TPM 2.0 through the kernel resource manager, |
The measurement register and the attestation key. There is no
mode without a TPM. An authenticated-image target accepts only a
|
SHA-256 PCR bank |
shirudo reads PCRs 9 and 11 and the config PCR in the SHA-256 bank and extends PCR 9 and the config PCR there. |
RSA-3072 primary keys with RSASSA and SHA-256 in the owner hierarchy |
The key that authorizes writes to the register through
|
ECC NIST P-256 primary keys with ECDSA and SHA-256 in the endorsement hierarchy |
The attestation key that |
An endorsement key in the RSA-2048 or ECC P-256 template |
Credential activation for |
NV index |
shirudo defines its register there. The index clears at TPM reset. |
Endorsement hierarchy without an authorization value |
shirudo creates the attestation and endorsement keys with an empty authorization. |
Owner hierarchy authorization, if set, in |
shirudo defines the NV index and the writer key under the owner hierarchy. See Configuration. |
Target userspace#
Requirement |
Reason |
|---|---|
systemd 256 or newer |
|
A systemd initrd built by dracut, with the |
The dracut module |
A unified kernel image booted through |
|
|
|
No other task adds keys to or restricts the |
|
Root |
Run shirudo as root on a target. |
|
|
The target needs no external tools: it maps and verifies the images through kernel interfaces.
Pre-flight checks#
shirudo init runs these checks first and stops when one fails.
shirudo init --check-only runs only them. See
shirudo init.
Check |
Passes when |
|---|---|
|
The effective UID is 0. |
|
|
|
|
|
The kernel BTF has the fields of the signed-loader ABI with the expected types. |
|
The kernel BTF has a |
|
The kernel BTF has no |
|
The primary certificate exists, is a regular file and is not empty. |
|
Every trusted certificate is ML-DSA-87. |
|
The kernel accepts every trusted certificate as an
|
|
|
|
The binary carries its two embedded BPF objects. |
|
|
Run the checks as root on a target:
target# shirudo init --check-only
Pre-flight checks:
OK root
OK bpf_lsm_active
OK bpffs_supported
OK signed_loader_kernel_abi
OK kernel_lsm_hooks
OK module_signatures
OK cert_on_disk
OK cert_algorithm
OK cert_kernel_support
OK kernel_keyring
OK embedded_loader
OK tpm2_reachable: TCTI from the config: device:/dev/tpmrm0
12 of 12 passed
A failed check prints FAIL and its reason, and the command exits 1
after init: pre-flight failed, <failed> of <total> checks.
Network#
Every HTTPS connection to a registry, an OTLP collector or an S3
endpoint uses TLS 1.3 with the hybrid key exchange X25519MLKEM768 or
SecP256r1MLKEM768. A server that offers neither fails the handshake,
unless its exact host name is listed in tls.classical_hosts. Then
shirudo also offers X25519 and secp256r1 and logs a warning when
the handshake uses one of them.
Operator host#
The operator host never loads BPF and never uses a TPM or the kernel keyrings. Any Linux kernel on which the tools below run serves.
Requirement |
Reason |
|---|---|
OpenSSL 3.5 or newer: |
ML-DSA-87 signing and hybrid ML-KEM TLS. The build refuses older versions. |
|
Linked by the |
|
|
The target kernel’s |
The one kernel-derived input of a build. |
|
Building runtime and config images, and |
|
|
|
|
The operator package depends on clang 23, as clang-23 in the Debian
package and clang >= 23 in the RPM, and on llvm and the
veritysetup package. Debian unstable, Fedora 45 and apt.llvm.org
ship clang 23. On Debian testing or Ubuntu 24.04, add Debian unstable or
apt.llvm.org as a package source before you install the package. A
build from source runs /usr/bin/clang, so point that at clang 23.
The operator and target packages conflict, so one host cannot install
both.
Build host for the target binary#
make target builds a static PIE binary with no interpreter, no
shared-library dependencies and no library search path. It runs make
target-deps first.
Requirement |
Reason |
|---|---|
Network access to the OpenSSL and curl release downloads and to the tpm2-tss Git repository |
|
autoconf, automake, libtool and autoconf-archive |
tpm2-tss’s |
Static |
Taken from the first of |
Static glibc, |
The static PIE link. They come from the compiler’s sysroot. |
|
The BPF objects embedded in the binary. |
BTF of a kernel with the signed-loader ABI |
The embedded BPF objects read |
|
The build checks that the result is a static PIE. |
The operator binary links the host’s shared libraries. Build it on the distribution it is installed on.