Skip to content

Releases: Foxboron/sbctl

0.15.4

05 Aug 13:29
0.15.4
147d522
Compare
Choose a tag to compare

Final landlock fixup, everything should be fine now.

  • Fixed an issue where sign-all did not report a non-zero exit code when something failed
  • Fixed and issue where we couldn't write to a file with landlock
  • Fixed an issue where --json would print the human readable output and the json
  • Fixes landlock for UKI/bundles by disabling the sandbox feature
  • Some doc fixups that mentioned /usr/share/

Generated list of changes

What's Changed

  • 91-sbctl.install: Unconditionally remove file from database by @chenxiaolong in #341
  • sbctl: Fix human readable output being printed when using --json by @chenxiaolong in #342
  • Ensure landlock works for signing entries by @Foxboron in #344

New Contributors

Full Changelog: 0.15.3...0.15.4

0.15.3

31 Jul 21:51
0.15.3
48a3109
Compare
Choose a tag to compare

Third time is the charm!

  • Fixed a mistake where the db_additions setting in sbctl.conf was not wired up to sbctl setup.
  • Relaxed the check for an existing install in sbctl setup form looking after /var/lib/sbctl to check for /var/lib/sbctl/keys.
  • Fixed a bug where dmi information was not read for quirk detection when landlock was enabled.
  • Fixed a bug where sbctl create-keys did not have access to /var/lib under landlock.
  • Fixed a bug where sbctl setup didn't have access to /usr/share.

Bugfix release 0.15.2

31 Jul 13:13
0.15.2
33247c9
Compare
Choose a tag to compare

What's better than one bugfix release? Two bugfix releases!

  • Fixed a bug where sbctl setup aborts early because /var/lib/sbctl already exists.

Full Changelog: 0.15.1...0.15.2

Bugfix release 0.15.1

31 Jul 12:28
0.15.1
80c451c
Compare
Choose a tag to compare
  • Fixed an issue where sbctl migrate did not work without --disable-landlock.

  • Fixed an issue where bundles.db would be written to files.json deleting list of files.

Full Changelog: 0.15...0.15.1

0.15

31 Jul 11:02
0.15
37c0ce9
Compare
Choose a tag to compare

Deprecation Notice

Caution

The bundle/UKI support in sbctl will be removed next release. Please move to dracut/mkinitcpio/ukify.

Important Changes

Landlock support

sbctl will try to sandbox all commands with landlock.
Landlock is a unpriviledged sandbox, similar to OpenBSD pledge, that allows
sbctl to declare the directories and files we are reading/writing a head. This
feature is enabled by default and can be disabled by setting landlock: false
in the new config file, or by passing --disable-landlock flag.

The landlock feature is run with "best effort" and will degrade it's feature set
on unsupported kernels before turning it off completely.

Please note that any file permission issues might be because of landlock.

Warning

Please try --disable-landlock before reporting bugs.

Major changes

Move from /usr/share/secureboot to /var/lib/sbctl and sbctl migrate

Important

Please run sbctl setup --migrate --disable-landlock. See #333

sbctl has moved from using /usr/share/secureboot to /var/lib/sbctl. The
useage of /usr was mostly for legacy reasons but there wasn't any motivation
to fix this until now.

To help with the migration sbctl migrate has been implemented. It will move
all the files from the old location to /var/lib/sbctl and rename files
accordingly.

Existing sbctl installations should continue to work with a warning message
that they should run sbctl migrate.

Important

For packagers:

The sbctl.DatabasePath variable is used by sbctl internally to denote the "old path" when using sbctl migrate. If you override this from the default /usr location during building do not remove it when building the new release.

Configuration file and sbctl setup

A new way to setup sbctl has been introduced, along with a declarative
configuration file . The default config file location is /etc/sbctl/sbctl.conf
and will be read on startup if available. If the file is not present sbctl
will use default settings.

The new sbctl setup --setup commnd will do a complete sbctl installation
based off on the new configuration file. If the file is not passed through
--config or read from /etc/sbctl/sbctl.conf it will use the default settings
to create and enroll Secure Boot certificates.

If a configuration file is provided then sbctl will attempt to sign the
default files and save them to the database for future signing.

In the future sbctl setup will provide an interactive setup that will sign the
default boot chain and produce a configuration file.

Example configuration file:

---
landlock: true
keydir: /var/lib/sbctl/keys
guid: /var/lib/sbctl/GUID
files_db: /var/lib/sbctl/files.json
bundles_db: /var/lib/sbctl/bundles.json
files:
- path: /efi/EFI/BOOT/BOOTX64.EFI
  output: /efi/EFI/BOOT/BOOTX64.EFI
- path: /efi/EFI/Linux/arch-linux.efi
  output: /efi/EFI/Linux/arch-linux.efi
- path: /usr/lib/fwupd/efi/fwupdx64.efi
  output: /usr/lib/fwupd/efi/fwupdx64.efi.signed
- path: /usr/lib/systemd/boot/efi/systemd-bootx64.efi
  output: /usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed
keys:
  pk:
    privkey: /var/lib/sbctl/keys/PK/PK.key
    pubkey: /var/lib/sbctl/keys/PK/PK.pem
    type: file
  kek:
    privkey: /var/lib/sbctl/keys/KEK/KEK.key
    pubkey: /var/lib/sbctl/keys/KEK/KEK.pem
    type: file
  db:
    privkey: /var/lib/sbctl/keys/db/db.key
    pubkey: /var/lib/sbctl/keys/db/db.pem
    type: file

TPM key files

sbctl now support creation of TPM key files using
go-tpm-keyfiles. These keys are
mostly compatible with how other TPM2 TSS keyfiles are created. This key type
can be used by passing on of several keytype flags to create-keys or
rotate-keys, or by specifying the type in the new configuration file.

The flags for create-keys and rotate-keys are

  • --keytype - Set keytype for all keys
  • --pk-keytype - Set PK key type
  • --kek-keytype - Set KEK key type
  • --db-keytype - Set db key type

The current x509 and RSA key type used by sbctl is now called file, and the
new TPM key file is called tpm.

Note that only RSA 2048 is supported by most TPMs while the default file type
defaults to RSA 4096. The default key type for sbctl will continue to be
file.

If you wish to rotate to a key hierarchy where PK and KEK are stored as tpm
key file, and db as a file keytype you can issue the following commands:

λ » sudo sbctl reset
✓ Removed Platform Key!
Use `sbctl enroll-keys` to enroll the Platform Key again.

λ » sudo sbctl rotate-keys --pk-keytype tpm --kek-keytype kek --db-keytype file
Backed up keys to /var/tmp/sbctl/sbctl_backup_keys_1722423218
Creating secure boot keys...✓
Secure boot keys created!
✓ Enrolled new keys into UEFI!
✓ Signed /usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed
✓ Signed /efi/EFI/BOOT/BOOTX64.EFI
✓ Signed /efi/EFI/Linux/arch-linux.efi
✓ Signed /usr/lib/fwupd/efi/fwupdx64.efi.signed

Other changes

sbctl debug

To help with debugging efforts sbctl debug has been implemented. It will dump
most of the efivarfs, the configuration, state information and version
information into a tarball which can be uploaded.

Major refactoring

Almost all of the core key handling and key hierarchy code in sbctl has been
reworked to better support different key types. This has lead to a great deal of
internal changes and refactoring. Some stuff might be subtly broken because of
limited ability to test everything.

However in the future it will be easier to create unit-tests for sbctl that
will make it more stable in the long run.

Generated list of changes

What's Changed

New Contributors

Full Changelog: 0.14...0.15

Release: 0.14

08 May 21:01
0.14
b7e1302
Compare
Choose a tag to compare

Another bugfix release with two new commands

New commands

  • export-enrolled-keys will export all enrolled keys on the system to a directory
  • list-enrolled-keys will list the enrolled keys on the system

New things

The test suite has now been rewritten to use the new vmtest library.

Bugfixes

  • sign-all won't abort when it encounters a file it can't sign.

Packaging changes

  • The kernel-install hook won't try to sign things if there are no signing keys available.
  • The kernel-install hook will now only remove things if they actually did exist on the system.
  • The mkinitcpio hook now only sign the built kernel/UKI instead of all the sbctl files.

Generated list of changes

What's Changed

  • 91-sbctl.install: don't sign without signing keys by @ajakk in #188
  • Mention COPR package by @dngray in #274
  • Add openSUSE to Installation in README by @photosheep in #279
  • sign-all don't stop signing if one file does not exist anymore by @jvllmr in #280
  • Update the mkinitcpio post hook to only sign the kernel/UKI which is currently being built instead of all the files in the sbctl database by @into-the-v0id in #285
  • ci.yaml: use github container registry by @pheiduck in #288
  • only remove entries if they are there by @hboetes in #294
  • Add list-enrolled-keys command by @jimmykarily in #296
  • Add Option ROM warning to Usage section of the manpage by @00-kat in #300
  • Run integration using uroot by @jimmykarily in #302
  • Add export-enrolled-keys command by @jimmykarily in #303
  • Update README.md by @hboetes in #305

New Contributors

Full Changelog: 0.13...0.14

Release: 0.13

25 Dec 21:16
0.13
ee7cf4a
Compare
Choose a tag to compare

This is largely a bugfix release with a couple of changes.

mkinitcpio hook

contrib/mkinitcpio/sbctl now contains a hook for mkinitcpio.

Similar to recent mkinitcpio changes, sbctl will now also sign when dkms modules change.

Fix create-keys flags

--export,-e and --database-path,-d now works properly and doesn't overwrite the create-keys variables internally.

remove erronous dbx enrollment

Previous release implemented support for dbx that doesn't really work as expected. It would also fail to enroll keys for previously setup clients. Implementation has been removed and will be iterated upon at a later date.

Generated list of changes:

What's Changed

New Contributors

Full Changelog: 0.12...0.13

Release: 0.12

20 Oct 19:11
0.12
748bc59
Compare
Choose a tag to compare

Deprecation notice

sbctl bundle might be deprecated in the future. This functionality is better served by ukify from systemd or the UKI support in mkinitcpio or dracut. I don't have any intentions of improving this feature going forward.

If your local initramfs generation tool does not support UKI generation you should write them some patches.

Custom certificates

sbctl now allows you to enroll custom certificates into KEK and db. This can be done by placing certificates into /usr/share/secureboot/keys/custom/KEK/ and /usr/share/secureboot/keys/custom/db then running sbctl enroll-keys -c.

Key export

sbctl now allows keys to be exported as EFI Signature Lists (esl) or EFI Authenticated Variables (auth), which are pre-signed.

Enrolling default certificates

sbctl can now enroll certificates found in dbxDefault, dbDefault, KEKDefault and PKDefault. These variables contains the default configuration for the machine and might have certificates that might be missing when only enrolling the microsoft certificates.

Usage:

// Defaults to "db,KEK"
sbctl enroll-keys --firmware-builtin

// Enroll everything from the vendor
sbctl enroll-keys --firmware-builtin "dbx,db,KEK,PK"

Support for partial key hierarchies

Before this release sbctl would enroll, reset and rotate the entire key hierarchy when requested. With this release several improvements have been made to have the ability to support partial key hierarchies. This can be used through the --partial flag in their respective commands.

Generated list of changes:

What's Changed

New Contributors

Full Changelog: 0.11...0.12

Release: 0.11

25 Mar 14:15
0.11
d1817b9
Compare
Choose a tag to compare

sbctl is a Secure Boot key manager that helps users create and enroll Platform Keys and managing signing files.

Firmware Quirks

sbctl now supports a system to detect firmware quirks that might affect the security or functionality of Secure Boot.

The initial revision supports detecting the widely reported MSI Secure Boot quirk.

Please see "MSI has very insecure Secure Boot defaults" for details, and #189 for the feature.

Big thanks to @dawidpotocki for solving the initial issue, the implementation of this new feature in sbctl and the
efforts he has put into this :)

Wiki pages

One wiki page for the new firmware quirk system has been added.

Other changes

  • UKIs generated by sbctl now has correct section alignment.

  • enroll-keys with --microsoft will now also enroll the KEK.

  • sbctl now has a filesystem abstraction layer which allows writing proper end-to-end tests of all efivarfs interactions and filesystem interaction.

Full Changelog: 0.10...0.11

Generated list of changes:

What's Changed

New Contributors

Full Changelog: 0.10...0.11

Release: 0.10

11 Dec 20:58
0.10
5a0bcb6
Compare
Choose a tag to compare

sbctl is a Secure Boot key manager that helps users create and enroll Platform Keys and managing signing files.

Support for key rotation

sbctl now allows for key rotation through sbctl rotate-keys. This can be used to renew certificates. It is also capable of resigning all signed files.

Wiki pages

A few wiki pages has been added to the project.

Other changes

Language and grammer changes to the manpages, and the Usage section in the man-page has become more precise.

There is also now some WIP documentation on how to reset keys in the BIOS menu.

There has also been several crashes and improvements to the error handling.

Full Changelog: 0.9...0.10