Skip to content

feat(platform): admit Fedora 44 and 45, provisionally - #251

Merged
WitteShadovv merged 23 commits into
nextfrom
feat/fedora-admission
Nov 25, 2026
Merged

WitteShadovv merged 23 commits into
nextfrom
feat/fedora-admission

Conversation

@WitteShadovv

@WitteShadovv WitteShadovv commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Choices first, since they change what passes.

  1. The gate's decoy disk check takes the decoy's own timers into account. A change counts as a timer's only when PID 1 reports a run of that unit that its timer triggered at least a second after the switch ended and that has ended, the inode changed while it ran, the contents last changed before the entry or during that run, and the unit makes the same change again when the gate starts it by hand, with nothing changing that path in 30 seconds before or after. Anything else still fails.
  2. The kernel log gap on Fedora 44 noda was not the ring buffer. The decoy's journal held all 17 records, and bytes went missing in the gate's read from the guest. So guest outputs now end with their SHA-256. A torn kernel log part, journal read or auditd log read is read again, any other torn output fails the run. I also raised log_buf_len to 16M. The lost record check is as strict as before.
  3. The /run check lets a unit's invocation link be only when it leads to the run the decoy's PID 1 runs now, that run started at least a second after the switch ended, the unit is not one of NAILS's and its unit file is outside /run. hostnamed and localed exit idle and the decoy starts them again. Tests cover the cases my first version got wrong.
  4. Provisional is a label in the docs, not a warning in check. Desktop editions warn.
  5. A Fedora host where SELinux does not run now warns in lsm-status, like a permissive one. Nothing tested Fedora without SELinux.
  6. Nobara and Ultramarine warn as untested derivatives. Any other host whose ID_LIKE names Fedora stays refused.
  7. Both Fedora images boot enforcing, so smoke, records, access times, oracle and gate all run enforcing. The plain probe still boots permissive.
  8. Refusals now end with every release NAILS supports.

What the branch does. Gate fixes first, then Fedora 44 and 45 got staged with the admitted build so their smoke and records ran before the flip, with a commit per Fedora fix the smoke needed. Then the admission commit flips the family table, enables both images, moves their records into the suite pull requests run, takes Fedora out of the refusal suite and drops the lsm-status cut from the oracle images.

After review I tightened the timer and /run rules as in choices 1 and 3, added Fedora 45 to the access time scenario and fixed texts that still read as before the admission. The threat model now says what each Fedora disk check reads.

Docs say what the admission covers. Headless Fedora 44 and 45 Cloud with SELinux enforcing and the targeted policy. Other editions warn. Provisional until a run on real hardware has passed.

The branch sits on next now.

Three flakes in the access time scenario were the test harness, not NAILS, and the last three commits fix them. On about one in twenty Fedora 45 runs the decoy's own stop at a plain soft-reboot failed to reset its zram device. That control's start never ran mkswap or swapon, but the start after a way back always does, so no control explained those reads. Now the scenario finds such an idle device after each control, resets it like the way back does and runs the control again with fresh aging, at most four times. It also resets it after the warm-up. The second was a kernel audit line landing in the middle of the backdoor's announcement on the serial console. The match now puts such a cut line back together, in the access time scenario and in the NixOS session helpers too. The third was Fedora 45's console. kmscon on tty1 starts its login once more as PID 1 stops it, so about one stop in five read login, PAM and their libraries, a plain soft-reboot too. No control can be made to hit that race, so one run had 44 such reads after a way back with clean controls. The scenario now masks kmsconvt@tty1 the way it masks the timers. The gate and the smoke keep the stock console. Nothing is allowlisted, every read after a way back still needs a plain soft-reboot read in the same run.

All three commits passed the full just check and the helper checks on the build server.

Runs on the head 9656d28. E2E all https://github.com/WitteShadovv/nails/actions/runs/45645663155 green. Distro E2E all https://github.com/WitteShadovv/nails/actions/runs/45645648847 and staged https://github.com/WitteShadovv/nails/actions/runs/45645654108 green. Access time records runs https://github.com/WitteShadovv/nails/actions/runs/45645648674 https://github.com/WitteShadovv/nails/actions/runs/45645717323 https://github.com/WitteShadovv/nails/actions/runs/45648109439 and https://github.com/WitteShadovv/nails/actions/runs/45649131350 green, every access time job on its first attempt with no zram retry. Oracle https://github.com/WitteShadovv/nails/actions/runs/45650660689 green on the full image set.

…the Fedora gate's disk comparison

The check that the decoy disk changed only where a plain soft-reboot
changes it failed once on Fedora 45 without dontaudit rules:
unbound-anchor's daily timer came due while the session ran and caught
up at the decoy's start after the way back, writing
/var/lib/unbound/root.key and the timer's stamp, which neither plain
soft-reboot had changed.

After each switch the gate now asks the decoy's PID 1 which of its
timers' units ran since its start, and when. A path counts as such a
run's only when its inode changed while the run went on and the unit
makes the same change when the gate starts it once more by hand, or
when it is the stamp of the run's persistent timer, dated at its
trigger. A path a timer explains in only one plain soft-reboot is no
longer part of the reference, so a chance run in a control does not
widen what a way back may change. A timer the gate adds to the decoy
before the first entry catches up at the first way back: its write must
count as its run's, the positive control of the reading.

The check's detail now lists the paths outside every control first,
since the CI log cuts it.
…ach it whole

The check that the kernel log lost no record failed once on Fedora 44
without dontaudit rules: the gate's copy of the cold boot lacked records
2276 to 2292, and with them audit records 1338 to 1354. The kernel had
not lost them: the decoy's journal held all of them, and in the gate's
copy record 2275 runs on into the tail of record 2292. The test driver
carries a guest command's output over the guest's console, and a run of
bytes went missing from the middle of that read, which the driver's
base64 decoded without an error.

The gate now reads the kernel log in parts of at most 200 records, each
ending with their number and their SHA-256, reads a part that does not
reach it whole again, up to five times, and fails the run when one never
does. The output of every other guest command it keeps ends with its
SHA-256 too, and one that does not reach it whole fails the run: those
commands may change the guest, so they are not run again. From the
reference boot on the kernel's log buffer holds 16 MiB instead of
Fedora's 256 KiB, so that a part read again is still there, and each
power cycle checks that its command line holds it. The check that no
record was lost stays as it was.
Fedora's admission covers SELinux enforcing with the targeted policy, as
the admission gate runs it, and permissive warns in lsm-status. So the
image table now boots both Fedora images enforcing, and every scenario
that boots them as the table pins them (the oracle images, the access
times, the refusal, the btrfs controls) runs on an enforcing decoy. The
probe of each image still boots it permissive, as its fixture records,
beside its enforcing variant.

The Fedora 44 and 45 images are staged for their family's admission as
arch-boxes is: the staged suite runs their smoke and records scenarios
with the test-only build that admits Fedora. The smoke expects the
lsm-status row to pass for SELinux that enforces on them. The records
scenario reads classic wtmp there as on Arch, and lastlog2 only where
the image's PAM stack writes it: Fedora 44's pam_lastlog2 fails to load,
as the gate's runs show.
The first runs of the smoke on the staged Fedora images failed on two
of its expectations. Fedora 44's lvm2 ships blk-availability.service
with /usr/bin/blkdeactivate, and the smoke took only /usr/sbin. Fedora 45 runs kmscon on
tty1 in place of a getty, and the smoke wanted a getty's number from the
fresh boot. The stop now counts with either path, and kmscon's unit is
among the consoles' units whose numbers the smoke reads at the fresh
boot and after the way back, as the admission gate reads them. A console
unit the image has no unit file for is passed over at once.
The first gate runs with the timer reading show that the decoy's PID 1
reports a unit's last run from before a soft-reboot too: after the
second way back it gave the time of the gate's own run by hand after the
first. The reading was already held to runs that started once the way
back had begun, so nothing it judges changes; the comments and the test
README said PID 1 keeps no run across a switch, and now say what it does.
…eached its checks

On Fedora 44 and 45 the smoke's activation under a CPU quota of 5% wrote
no residue baseline within ten minutes, and the subtest timed out without
showing why: the activation's own output stayed in its log file. The
subtest now waits for the baseline or for the activation's end, and
when the baseline is not there it fails with what the activation printed
and its exit status, also after the timeout.
With the activation's output shown, the smoke on Fedora 44 showed why
the Ctrl+C activation never reached its checks: its unit ended at once
with exit status 203, as PID 1 did not start the binary shared in over
9p on an enforcing decoy. The unit now runs the decoy's shell, which
execs the binary, so the activation is still the unit's main process,
takes the same quota and gets the same interrupt.
…he smoke's clean baseline

On Fedora 44 and 45 the residue report of the smoke's first activation
warned of /var/log/audit, which the image's auditd wrote at its boot
until the scenario made the decoy amnesic. That log is the decoy's own
record from before any session, and the report names it as it should.
The smoke now notes whether auditd ran before it stopped it, and the
clean baseline lets that one warning be there on such an image alone;
any other warning still fails it.
…smoke's live read

The smoke's read of the decoy's files through its own kernel bound only
/ into /run, and Fedora mounts its /home and /var subvolumes apart: on
Fedora 44 and 45 the read found nothing of the positive control the
scenario writes below /var/tmp, and the leak check failed. The read now
binds each mount of the root's filesystem, found by its UUID,
read-only, and reads them all.
…older roots the disk lost

The smoke's leak check failed on the Fedora images in its reads of the
btrfs history. On Fedora 44 the carve of zstd frames missed control
(c), the compressed file deleted right before the image, which the
smoke took only after it had shut the decoy down. On
Fedora 45 btrfs restore could not read one older root of the clean
image at all: its tree root blocks read back at other levels than their
root items name, so the disk no longer held that tree.

The image of the controls is now copied with the guest paused right
after the deletion, as the admission gate's btrfs controls are. An
older root whose restore errors say only that its tree is gone
(btrfs_scan.root_gone) and that yielded nothing is shown and passed
over; any other error of a restore still fails the check. The test
README also says what the two smoke changes before this one do: the
audit log warning a decoy whose auditd ran keeps in the clean baseline,
and the live read of every mount of the root's filesystem.
Fedora's admission gate passes on the Cloud images of Fedora 44 and 45:
the headless smoke of the gate, the btrfs scan controls, the oracle's
Fedora images, the login records and no new denial of NAILS on SELinux
enforcing with the targeted policy, with and without the policy's
dontaudit rules. So the family table admits Fedora and validates both
releases. The Cloud edition runs clean; Workstation, KDE Plasma Desktop,
any other edition and a host that names none warn that NAILS has not
been tested on them, a release after 45 warns, and one before 44 is
refused. Nobara and Ultramarine follow their base from release 44 on, as
untested derivatives, and any other host whose ID_LIKE names Fedora is
still refused. The refusals of a host NAILS does not run on now end with
every release NAILS supports, not with the Debian family alone.

The image table enables both Fedora images, which puts them in the
smoke suite, and their records scenarios move to the records suite that
pull requests run, as Debian's and Ubuntu's do. The access-time
scenario, the oracle's Fedora images and the gate run the release
binary there, lsm-status included, on decoys that boot enforcing as the
image table pins them. The refusal suite keeps Arch alone.

The README, the operator guide, the decoy requirements, the threat
model, the residue catalog and the CHANGELOG say what the admission
covers: the Cloud edition of Fedora 44 and 45, tested in virtual
machines only and so provisional until a run on real hardware has
passed, with SELinux enforcing and the targeted policy as the gate ran
it. The Fedora section of the decoy requirements and the SELinux bullet
of the threat model come from the gate's own docs, held for this commit
and checked against what the gate asserts now.
…n they come torn

The first gate runs on the admission head failed Fedora 45 once on the
new check that every guest output reaches the gate whole: the read of
the decoy's whole journal after the first way back, about 650 KB, came
torn. The same run also missed one audit record of the reference boot
in both logs, and the gate read auditd's log without any such check.

The reads of the decoy's journal, the whole one and its kernel records,
and of auditd's log only read, so a torn output of one is now read
again, up to five times in all, as a part of the kernel log is, and
counts as torn only when it never comes whole. auditd's log is read
through the same guarded command as the others. The check names what
was read again beside what came torn.
… Fedora gate's disk comparison

The disk comparison counted any run of a timer's unit that started once
the way back had begun, whatever started it, and took as the unit's every
path that changed on the decoy disk while the gate started the unit again
by hand, whoever changed it. A still running unit's window reached to the
time of the reading.

A run now counts only when its timer's last trigger came when it
started, and only once it has ended: the gate waits up to two minutes for
a run still going and reads the runs again. Around the start by hand the
gate lists the decoy disk's changes for 30 seconds before it and for as
long as it took, 30 seconds at least, after it, and drops every path that
changes there from the unit's own changes.
lsm-status passed every host where SELinux does not run. A Fedora host
booted with selinux=0 therefore passed silently, though NAILS is tested on
Fedora only with SELinux enforcing the targeted policy, and a permissive
one warns. Where the host's os-release names Fedora, as its ID or in its
ID_LIKE, a host without SELinux now warns as well, naming why. Other hosts
without SELinux still pass.
Fedora 45 is admitted, but only Debian 13 and Fedora 44 ran the
access-time scenario, and the Fedora gate lists changed and modified
times only, so no run looked for a read of the decoy disk that a
plain soft-reboot does not make on Fedora 45. Add its driver to the
records suite and name it where the scenario's images are listed.
…s before it

The README's requirements row and upgrade notes named only NixOS,
Debian and Ubuntu as supported hosts. Fedora's provisional label was
explained by its tests running in virtual machines only, as if the
other families had a run on real hardware: it now says only that
Fedora's support is provisional until such a run has passed. The rows
of the residue catalog that promised a test once the Fedora images
boot now say that no test asserts them yet, and the chrony row names
the gate's disk comparison, which covers /var/lib/chrony.

The timer stamp row and the session-time records said that missed
timers catch up at the next decoy boot. The gate's own timer shows a
persistent timer that came due during the session catching up right
after the way back, so its stamp and its unit's writes date the way
back, and the texts now say so.

The probe README, the refusal-suite examples and two code comments
still said Fedora was not admitted or was refused.
… as the decoy's in the Fedora gate

The check that nothing of the session stays in /run failed on all four
gate variants after the second way back. hostnamed, and on Fedora 45
localed, had exited idle before the second entry, and the decoy's start
after the way back started them again, so the link PID 1 keeps for each
run of a unit was new against /run before the entry. Both plain
soft-reboots ran with those units up before and after, so their shape
was not among what a plain soft-reboot adds.

Right after the listing of /run, the gate now reads each such new link
against the decoy's PID 1: the invocation ID of the unit's run now, when
that run started and the unit's file. Once the run is over, the check
reads that against the time the switch's last step ended. A link counts
as the decoy's own only when it leads to the run PID 1 runs now, that run
started a second or more after the switch (PID 1 gives a start to the
second), the unit is none of NAILS's and its unit file lies outside
/run. A link that leads elsewhere, to a run from before the switch,
including one the hidden root's PID 1 started after the leave mark, to a
run of NAILS's own reconcile unit, or of a unit with no file or one in
/run, still fails the check, as does every link when the switch's time
is unknown.
…change's contents by the run

The disk comparison after a way back counted a run of one of the decoy's
timers from the hidden session's leave mark on. The hidden root's PID 1
runs for one to two seconds after that mark, so a run it started as it
shut down counted as the decoy's. And a path counted as a run's when its
inode changed while the run went, whatever its contents did: contents
the session changed, which a later run only touched, read as the run's.

The comparison now reads each way back's runs against the time the
switch's last step ended, as the /run check does: a run counts only when
it started a second or more after that (PID 1 gives a start to the
second). A way back whose switch's time the gate could not read has
nothing explained. A path counts as a run's only when its contents last
changed before the entry or while the run went.
…els and cryptsetup

The distribution workflow's header and the changelog named only Fedora 44
among the access-time scenarios, though Fedora 45 runs one too. The
threat model's evaluation scope listed only the Debian and Ubuntu smoke
runs among the automated checks of the decoy disk: it now names what
each check on Fedora 44 and 45 reads, the smoke run's live read, zstd
carve and older roots, the admission gate's live comparison of the disk
mounts, and the oracle's images of the powered-off disk, with what the
oracle does not see.

The README names Fedora as provisional where it lists the hosts, and
its kernel row names the kernels of the pinned Fedora images. The
cryptsetup table in docs/backends.md lists Fedora 44 and 45, which
update cryptsetup within a release. The roadmap keeps the desktop
editions' warning until the first-run counters pass too, as a test of a
graphical session alone does not lift it.
…t the records checks judge

The decoy's PID 1 starts its first units one to one and a half seconds
after the switch, not two, and the counted runs start 1.7 seconds or more
after it. The gate's disk comparison leaves the login and boot record
files to the records checks, as the e2e README already says.
A switch ends when the new backdoor announces itself on the serial
console. The kernel writes its own lines there between the pieces of a
line a process sends, and on Fedora an audit record of the new
userspace's start landed in the middle of the announcement, so the
access-time scenario waited 600 s for an announcement it had already
seen. session.backdoor_announced puts such a line together again before
it matches, and follow_soft_reboot, follow_power_off, the backend-fault
follower and the access-time scenario's own switch use it.
…e zram device idle

On about one in twenty Fedora 45 runs the decoy's own stop at a plain
soft-reboot control failed to reset its zram device, which was still
busy. The device kept its size and its swap area with no swap on it, so
that control's start ran none of systemd-makefs, mkswap and swapon. The
way back resets such a device before the decoy starts, so the start
after it always reads those files, and no control explained them.

After each control's listing the scenario now asks for the zram devices
that are set up and hold a swap area no swap uses, the rule NAILS' own
reset follows. Where one is left it resets it as the way back does and
runs the control again with the disk aged afresh, at most four times,
and fails with a zram message after that. A control that left such a
device still counts. After the warm-up switch it resets such a device
and starts its swap again. The report records the idle devices after
each control and each way back, and the findings are printed before the
report's long line, which `gh run view --log` cuts. No path is let
through: every read after a way back still needs a control of the same
run that made it.
kmscon, Fedora 45's console on tty1, starts its login once more at
about one stop in five, within milliseconds of PID 1 stopping its unit:
/usr/bin/login, the PAM modules and libraries it loads, login.defs and
the issue files. Plain soft-reboot controls hit that race at their stop
in some runs and miss it in others. A records run whose two way ins hit
it while all three of its controls missed it failed on 44 such reads,
each one 3 ms after PID 1's "Stopping kmsconvt@tty1.service".

No control can be made to hit or miss that race, so the scenario masks
the unit before the first measured phase, as it masks the decoy's
timers. No path is let through.
@WitteShadovv
WitteShadovv merged commit 51f0919 into next Nov 25, 2026
136 checks passed
@WitteShadovv
WitteShadovv deleted the feat/fedora-admission branch November 25, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant