Bug 2561554 - systemd-bootx64.efi is signed with a self-signed certificate
Summary: systemd-bootx64.efi is signed with a self-signed certificate
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd-boot
Version: 45
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Zbigniew Jędrzejewski-Szmek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-10-27 07:01 UTC by kompost
Modified: 2026-11-18 08:12 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description kompost 2026-10-27 07:01:46 UTC
There is now a signed "systemd-boot-x64" package for f45 and f46. However unlike grub it is not signed with "fedoraca", but with a self-signed certificate.



Reproducible: Always

Steps to Reproduce:
Did this on rawhide, so you see "fc46" here; results should be the same on f45.

1. Download the rpm

dnf download systemd-boot-x64.noarch

2. Convert to tar

rpm2archive systemd-boot-x64-262-1.fc46.noarch.rpm

3. Extract the tar

tar -xf systemd-boot-x64-262-1.fc46.noarch.rpm.tgz

4. Download / obtain fedora-ca-20200709.pem (see "additional information")

5. Observe signature check fails for "systemd-bootx64.efi.signed":

sbverify --cert fedora-ca-20200709.pem usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed
Signature verification failed

6. Check kernel signature, for comparison (the kernel might be in a different location on your system):

sbverify --cert fedora-ca-20200709.pem /boot/efi/0920d62f78ef499db2bbbbd44009715c/7.2.0-0.rc3.260715g58717b2a1365.29.fc45.x86_64/linux
Signature verification OK

7. Check grub signature, for comparison (do "dnf download grub2-efi-x64.x86_64", convert to archive and extract, as described in steps 1 through 3, and then):

sbverify --cert fedora-ca-20200709.pem usr/lib/efi/grub2/1:2.12-66.fc44/EFI/fedora/grubx64.efi
Signature verification OK
Actual Results:
The following command prints "Signature verification failed":

sbverify --cert fedora-ca-20200709.pem usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed

Expected Results:
The following command should print "Signature verification OK":

sbverify --cert fedora-ca-20200709.pem usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed

Additional Information:
Instructions for obtaining fedora-ca-20200709.pem: https://docs.fedoraproject.org/en-US/security/cryptography/signatures

Related forge ticket (fedora-ca-20200709.txt is attached in the comments): https://forge.fedoraproject.org/releng/tickets/issues/10765

Related bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2020922

Comment 1 Zbigniew Jędrzejewski-Szmek 2026-10-27 09:19:57 UTC
Yeah, that is intended. There was no agreement to sign systemd-boot with the real key integrated in the normal SecureBoot hierarchy. The idea here is that people can do self-enrollment of the certificate and then used systemd-boot after that. At some point we'll want to change this, but for now, things are as they are.

Comment 2 kompost 2026-10-27 09:54:26 UTC
Yes, thank you. I've been reading the forge thread again, and indeed, this is the intended outcome. Some users may have expected the "real thing" though, a signed sdboot that works "same as grub" and gets installed right away when you pass "inst.sdboot" to the Everything- (or Server-) installer. Is there another bugzilla to track these requirements? In this case, please close this bugzilla as a duplicate.

I understand, at least for f45, we have to enroll a new certificate in our secureboot "db". Is there a convenient location where we can download the new certificate, or do we have to extract it from the rpm first?

Comment 3 Jeremy Linton 2026-10-27 19:00:49 UTC
Not afaik, I've got a bit of code which actually was generating a key, signing the unsigned systemd-boot, and enrolling it and the fedora key so the kernel also is accepted, but if we sign them with the same key then all that is needed is enrolling the key, but... its sorta sketchy to do automatically.

Maybe the sdubby package should include a "enroll-sdboot-keys.sh" script or similar, then the user can enroll them after the first boot, and take the machine out of setup mode.

Comment 4 kompost 2026-10-31 04:51:30 UTC
Another thing came up. Apparently there are two different "interpretations" of secureboot, and only one of them can be made to accept a self-signed certificate (unless one signs the kernel, too). See "Background" below. In practice this means we have to disable secureboot on some devices. (And by the way, grub is still not possible, because of grub's unresolved problem with tpm and measured boot, see https://bugzilla.redhat.com/show_bug.cgi?id=1975891).

Background: We are using a "systemd-bootx64.efi.signed" which is signed by our own "my-db" key. "my-db" is enrolled and signed by "my-KEK", which is signed by our self-signed "my-PK". So we are already using "customized secureboot keys".

Our kernel however is not signed with "my-db". We're using the stock fedora kernel, which is signed by "fedoraca". Fedoraca is also enrolled (also signed by "my-KEK"), so this boots successfully with secureboot enabled (on lenovo). Here's a the picture of our boot process:

EFI                           ==> systemd-bootx64.efi ==> kernel
(contains my-db AND fedoraca)     (signed by my-db)       (signed by fedoraca)

The problem, as far as we understand it: There are two DIFFERENT signers in this boot chain. Apparently on some devices, this is rejected by their secureboot implementation. On said devices, we still get to the sdboot boot-menu. But then the kernel does *not* boot, we get a secureboot violation error. Some (or all) of our fujitsu laptops seem to be affected by this. By contrast, the boot process DOES work on some (or all) lenovo laptops.

So far, none of the possible solutions are very tempting:

* install windows on the fujitsu laptops (unironically this could be the most feasible route, considering the alternatives below)
* disable measured boot, switch to grub (major hurdle, not only because we'd have to securely distribute the disk encryption key to users)
* get rid of full disk encryption on fujitsu, use plain partitions (can't do this because of regulations)
* disable secure boot on fujitsu (can't do this, regulations)
* contact fujitsu, hope for bios update (pray)
* create a redhat bugzilla (they won't ignore it, if it has high priority, right? ;)
* sign the kernel with my-db too (major hurdle because we'd have to sign every kernel update, we don't have the infra for that)

Comment 5 Gerd Hoffmann 2026-11-02 12:19:29 UTC
placing shim.efi in the loop might get around the firmware bugs, i.e.
EFI -> shim -> sdboot -> kernel

also you can just add the fedora signer certificate to 'db' instead of
re-signing with your own key.

Comment 6 kompost 2026-11-13 17:16:07 UTC
It took a while to put the shim in our boot chain, but this was the solution.
It is working fine now, both on Lenovo and Fujitsu.
Thanks for nudging us in the right direction.
This github issue was also helpful:
https://github.com/systemd/systemd/issues/27234

Anyways, we still had generate and enroll our own keys and sign systemd-bootx64.efi
(from systemd-boot-unsigned). Not exactly a smooth ride compared to grub.
How do we improve this? Bake the current self-signed key into shim?
Or sign systemd-bootx64.efi with kernel-signer?

Comment 7 Gerd Hoffmann 2026-11-18 08:12:50 UTC
kraxel@fedora ~# sudo dnf install virt-firmware
kraxel@fedora ~# pe-inspect --extract /usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed
# file: /usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed
#    header: size=0x400 imagesize=0x2e000 nx-compat=yes
#    section: file 0x00000400 +0x00007800  virt 0x00001000 +0x000077b1  r-- (.rodata)
#    section: file 0x00007c00 +0x0001e400  virt 0x00009000 +0x0001e2a6  r-x (.text)
#    section: file 0x00026000 +0x00001000  virt 0x00028000 +0x00000ee0  r-- (.rodata)
#    section: file 0x00027000 +0x00000200  virt 0x00029000 +0x000000f8  rw- (.data)
#    section: file 0x00027200 +0x00000200  virt 0x0002a000 +0x000000e5  r-- (.sbat)
#       sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md
#       systemd-boot,1,The systemd Developers,systemd,262,https://systemd.io/
#       systemd-boot.fedora,1,Fedora Linux,systemd,262-1.fc45,https://bugzilla.redhat.com/
#    section: file 0x00027400 +0x00000200  virt 0x0002b000 +0x0000002d  r-- (.sdmagic)
#       #### LoaderInfo: systemd-boot 262-1.fc45 ####
#    section: file 0x00027600 +0x00000200  virt 0x0002c000 +0x00000044  r-- (.osrel)
#    section: file 0x00027800 +0x00000200  virt 0x0002d000 +0x000000a4  r-- (.reloc)
#    sigdata: addr 0x00027a00 +0x00000a40
#       signature: len 0xa3f, type 0x2
#       >>> systemd-bootx64.efi.signed.sig1
#          certificate
#             subject CN: fedora-signer-20250530
#             issuer  CN: fedora-ca-20250530
#             >>> fedorasigner20250530.pem
                  ^^^^^^^^^^^^^^^^^^^^^^^^ enroll this in 'db'


Note You need to log in before you can comment on or make changes to this bug.