Startup checks
The daemon checks the host each time it starts, in the order listed in Agent. This page lists the checks a bring-up has to meet, and the script that meets them on a development host.
Host checks
Check |
On failure |
To meet it |
|---|---|---|
Kernel lockdown at |
Refused, exit status 78. |
Secure Boot on a kernel that locks itself down under it, or
|
|
Refused, exit status 78. |
Secure Boot, or |
IMA appraises executables |
Warning; tokens report |
An IMA policy with an appraise rule for |
|
Refused, exit status 78. With no TPM device present, or with no
SELinux policy loaded, a warning. |
The udev rule and the SELinux module (Manual steps). |
The enforcement object's signature verifies |
Refused, exit status 78; PCR 14 untouched. |
|
The object's |
Refused, exit status 78; PCR 14 untouched. |
An object built from the same release as the agent. |
The host booted via UEFI |
Refused, exit status 78. |
|
An AIK in the TPM has its record on disk |
Refused, exit status 78. |
TPM. |
PCR 14 holds the initramfs lock or this binary's commitment |
Refused, exit status 78. |
A cold reboot after the initramfs carries |
The kernel loads and attaches the enforcement object |
The start ends with |
A kernel at or above the floor (Platform support). |
Each refusal is a line at error level in journalctl -u lota-agent. A
check that fails on a transient error, such as EIO or ENOMEM, exits
1 instead. A refusal with exit status 78 keeps lota-agent.service in
the failed state, since the unit does not restart on it, and stops
lota-agent.socket (Agent lifecycle).
The lockdown and signature checks run in every mode
(src/agent/bpf_loader.c). With Secure Boot on, their refusal
names the kernel parameter to add; with it off, it points to the firmware
setting and lota-install --status.
Mode
The five switches of lota.conf take effect only with mode = enforce
(BPF LSM program). In monitor the daemon logs a line opening
Armed and inert in that names the switches that are on, and
lota-agent --dump-config prints the same list:
mode = monitor
# mode = monitor leaves inert: strict_mmap, block_ptrace, block_anon_exec
Development host
scripts/lota-dev-bringup.sh runs from a checkout, after sudo make
install. That target copies the files, the SELinux module and the udev
rule; it loads neither of them and does not rebuild the initramfs. The
script runs as root and exits 2 otherwise, or on an unknown option.
sudo make install
sudo scripts/lota-dev-bringup.sh
sudo reboot
In order, the script:
generates
/etc/lota/policy.keyand/etc/lota/policy.pubwithlota-agent --gen-signing-key, when either is missing;signs
/usr/lib/lota/lota_lsm.bpf.owith that key, unlesslota-agent --verify-policyalready accepts its signature under/etc/lota/policy.pub;copies
configs/lota.conf.exampleto/etc/lota/lota.confwhen the file is missing;adds
policy_pubkey = /etc/lota/policy.pubabove the first profile section when nopolicy_pubkeyline is there, and keeps the file as it was whenlota-agent --dump-configrefuses the result;loads
configs/ima/lota-ima-policyinto the kernel only when the kernel appraises, appraisal is not in enforce, and the loaded policy does not already appraise executables. Under Secure Boot appraisal is in enforce, and the script only warns.
Each step that finds its result in place says so and skips. A failed step ends the run with exit status 1 and keeps what the steps before it did.
--reset also deletes the aik*, clock*, boot_commit* and
snapshot* files in /var/lib/lota, evicts the AIK at the
aik_handle the agent reads from lota.conf, and evicts the seal
primary with lota-agent --seal-evict-primary. It leaves the AIKs of
the profiles in place. This destroys the host's attestation identity: a
certificate for the old AIK does not match the new one. It refuses while
lota-agent.service or lota-attest.service is active, or while the
PID in /run/lota/lota-agent.pid is alive.
LOTA_BRINGUP_ROOT prefixes the paths under /etc, /usr,
/var, /run, /proc and /sys and lifts the root check, for
tests; systemd and the TPM are not redirected.