Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#71822 - [sbsigntools] EFI singing checksum is wrong

Attached to Project: Arch Linux
Opened by Anatoly Velizhanin (anveliz) - Friday, 13 August 2021, 03:28 GMT
Last edited by Andreas Radke (AndyRTR) - Tuesday, 31 August 2021, 18:29 GMT
Task Type Bug Report
Category Packages: Extra
Status Assigned
Assigned To Tobias Powalowski (tpowa)
David Runge (dvzrv)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No



A good description is here:

Briefly, when I need to sign EFI stub unified kernel, sbsign signs it with a wrong checksum so the file can't be validated by secure boot (and properly signed with osslsigncode files can't be validated by sbverify).

Additional info:
* package version(s) 0.9.4-1
* config and/or log files etc.
* link to upstream bug report, if any:

Steps to reproduce:
just create a PE/COFF file with gaps between sections with e.g.:

objcopy \
--add-section .osrel="/usr/lib/os-release" --change-section-vma .osrel=0x20000 \
--add-section .cmdline="/etc/commandline.conf" --change-section-vma .cmdline=0x30000 \
--add-section .linux="/boot/vmlinuz-linux" --change-section-vma .linux=0x40000 \
--add-section .initrd="/boot/initramfs-linux.img" --change-section-vma .initrd=0x3000000 \
"/usr/lib/systemd/boot/efi/linuxx64.efi.stub" "/efi/EFI/Linux/Arch.efi"

then sign it with osslsigncode (from AUR) and the checksums are different. the file signed with osslsigncode passes secure boot validation, and the one signed with sbsign doesn't.

Btw, it seems that the package in arch repo is outdated since it has been fired already in ubuntu e.g.
This task depends upon