Login
You're viewing the ruby.social public feed.
  • Nov 27, 2026, 10:08 AM

    It's that time again! The systemd v263 release is coming closer. Let's restart the "what's new" series of posts for this iteration! Hence:

    1️⃣ Here's the 1st post highlighting key new features of the upcoming v263 release of systemd. #systemd263 #systemd

    In a secure OS it's often important to think about secure parameterization of the OS when it boots up, i.e. so that when it initializes it knows where to find its root disk or which payloads to acquire.

    💬 1🔄 10⭐ 20

Replies

  • Nov 27, 2026, 10:11 AM

    This is particularly challenging as these parameters need to authenticated in some way, or otherwise have a trust model associated. For example, just passing in a kernel cmdline switch for parameterization is not that easy anymore if you have SecureBoot which doesn't allow that...

    In earlier versions of systemd we already introduced two mechanisms to parameterize the OS boot in a secure way: first of all there are TPM-bound system credentials. These are great but can…

    💬 1🔄 0⭐ 0
  • Nov 27, 2026, 10:14 AM

    …reasonably only be used locally, i.e. with direct access to the local TPM of the system. This means they only really work for every boot but the first. But quite often the first boot is one of the most interesting ones to parameterize. Bummer.

    The second mechanism we added is "PE Addons". These are basically small EFI PE binaries that contain no code. I.e. in structure they pretend to be executables, but if you look inside of them, there actually is no code, just data.

    💬 1🔄 0⭐ 0
  • Nov 27, 2026, 10:17 AM

    PE addons are authenticated by means of UEFI SecureBoot/SHIM (which can be used to cover any PE file after all). Which is great and works on any boot, first or later. However, it also has one problem: the signature keys must be recognized by UEFI's and SHIM's keyrings. And that's painful, because even if MOK is used it's not really a user friendly UI flow, and completely falls flat in non-interactive boot-ups (since MOK is built around interactive confirmation). Bummer!

    💬 1🔄 0⭐ 0
  • Nov 27, 2026, 10:23 AM

    With v263 there's now a third way to authenticate credentials and other parameterization. It's also built around PE addons, but provides a different mechanism to establish trust. Instead of checking against some key in TPM or UEFI, this one implements a "Trust On First Use" (TOFU) scheme. Or in other words: on the first boot of the OS no authentication takes place, but on all subsequent ones, this path is securely closed.

    How precisely does this work? Basically, you prep a PE Addon…

    💬 1🔄 0⭐ 0
  • Nov 27, 2026, 10:25 AM

    …as usual (containing creds, a kernel cmdline switch, an initial initrd, a devicetree, whatever you need), but then simply don't sign it. You place it in the usual dirs in the ESP, and the UKI will pick it up. Traditionally such an unsigned PE would simply be skipped by the UKI, because it isn't signed. But if you prep a special UKI that has "TOFU=1" in the .profile PE section of the selected profile, then behaviour is changed: if we determine that we are booting for the first time, …

    💬 1🔄 0⭐ 1
  • Nov 27, 2026, 10:27 AM

    …we'll accept the unauthenticated PE addons, and at the same time hash them and store the hashed list in a special persistent EFI variable that is only accessible to pre-boot (i.e. not to the OS). On subsequent boots this variable in the system's NVRAM exists already, which we'll see and then *only* accept the same PE addons again, but no further ones.

    Note that this mechanism is opt-in: this TOFU scheme is never done unless the UKI vendor explicitly opted into it, for a specific profile.

    💬 1🔄 0⭐ 0
  • Nov 27, 2026, 10:30 AM

    Not defaulting to this matters, because upgrading from systems without this TOFU scheme to systems with it is not obvious. Something that isn't a first boot of the OS might appear as one, as the TOFU EFI variable didn't exist yet. By making this opt-in this upgrade pitfall will not exist unless developers opted into it explicitly.

    What's the usecase for all of this? Here at @amutable we want to be able to configure the first boot of the OS in a reasonable way, without compromising security…

    💬 1🔄 0⭐ 0
  • Nov 27, 2026, 10:32 AM

    @amutable …of subsequent boots. In particular we want to insert user-owned dm-verity signing keys into a fresh OS installation before it is booted for the first time.

    (More details about using this for dm-vertity signing keys, we'll have a in a later post in this series).

    💬 1🔄 0⭐ 0
  • Nov 27, 2026, 10:35 AM

    @amutable In case you wonder how reliable the security of those special pre-boot EFI variables unaccessible to the OS is, do note that this is also what SHIM uses to store its keyrings, hence it all rests on the same basic security concepts UEFI provides.

    💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0