Some Bits: Nelson's log

Proxmox secure boot: June apocalypse

The failed Secure Boot technology has a booby trap in it that might keep Linux boxes, including VMs, from successfully booting because some certificates start expiring June 24. The suggested fix is to enroll new security keys, which require a lot of BIOS fiddling. I was impressed Proxmox had a warning about this for your VMs and a tool for fixing it. Seems to work. It adds ms-cert=2023k,pre-enrolled-keys=1 to the disk options for the EFI partition.

Update: secure boot keys on PC hardware

I have some hardware I don’t have access to and I’m wondering if it will refuse to boot come June 27. Here’s some stuff you can do from a Linux CLI. RedHat also has decent docs on this.

mokutil --sb-state will tell you if secure boot is active at all. It looks like it’s disabled on both of my Linux servers. A little surprised at that, btw.

mokutil --db will show you the enrolled keys for secure boot. I don’t really know how to read all this, but you can find the problematic keys.

        Issuer: C=US, ST=Washington, L=Redmond, O=Microsoft Corporation, CN=Microsoft Corporation Third Party Marketplace Root
        Validity
            Not Before: Jun 27 21:22:45 2011 GMT
            Not After : Jun 27 21:32:45 2026 GMT

Apparently the good new key will say 2023, but I don’t have one to be sure.

Adding the new key is something you have to do in the BIOS. Installing a firmware update from the console is the surefire way. LVFS should also be able to do it, maybe as simple as fwupdmgr update. But that doesn’t seem to add a 2023 cert for me on my ASUS motherboard.

Looking in dmesg for things about X.509 certs may be instructive for what the Linux system is doing. That won’t tell you what the BIOS is doing though.

A fine rant

Secure Boot is a complete disaster. In theory it was supposed to protect against pernicious malware. In practice it’s been a complete sham since the beginning because all the implementations are deeply buggy. See here for some history on that. If BIOS malware were a real thing in practice we would have seen a lot more attacks against these buggy implementations using such things as CN=DO NOT TRUST that were trusted by every major PC manufacturer.

What Secure Boot did do was protect Microsoft’s monopoly. It continues to make installing other operating systems very difficult on PCs. About once a year I have to spend an hour+ dealing with some sort of secure boot fiasco in Linux. The most recent example: Nobara just doesn’t support it at all because they have no practical way to sign kernel packages in their build system.

So I’m disabling Secure Boot everywhere. Including in VM BIOS, what a farce. I had one old PC that caused problems if you disabled it though. If you turned off secure boot there was no way to use some other platform features, maybe the TPM? I haven’t run into that in awhile though.