Re:Linux and Secure Boot certificate expiration
by craftkiller on Saturday July 19, 2025 @09:50AM
(#44615474)
Or you could just remove microsoft's keys from your systems and sign your bootloader with your own key. That's what I do on all of my systems so I am unimpacted by this.
Re:Linux and Secure Boot certificate expiration
by brudgers on Saturday July 19, 2025 @11:55AM
(#44616568)
Warning: Replacing the platform keys with your own can end up bricking hardware on some machines, including laptops, making it impossible to get into the firmware settings to rectify the situation. This is due to the fact that some device (e.g GPU) firmware (OpROMs), that get executed during boot, are signed using Microsoft 3rd Party UEFI CA certificate or vendor certificates. This is the case in many Lenovo Thinkpad X, P and T series laptops which uses the Lenovo CA certificate to sign UEFI applications and firmware.
“Just” is doing a lot of heavy lifting in that solution.
Re:Linux and Secure Boot certificate expiration
by josephcsible on Saturday July 19, 2025 @11:26AM
(#44616310)
Sure, but that's a lot more work than just disabling Secure Boot, and for most people's threat models, there's zero actual security benefit gained in return.
Re:Linux and Secure Boot certificate expiration
by willa_bombadier on Saturday July 19, 2025 @11:08AM
(#44616122)
There should be some “Sane Usage” certification that a device doesn’t do secure boot, provides fully open and self-maintainable hardware, is independent of all external entities for ongoing use, provides hardware switches to turn off built-ins like ports, mics, and cameras, for power-savings and security.
Re:Linux and Secure Boot certificate expiration
by bayindirh on Saturday July 19, 2025 @12:03PM
(#44616647)
To be able to get Windows licenses and preload Windows on your system, put that little Windows sticker and sell your machine to the masses, you need a Windows Compatibility certificate, and that certificate needs you to have Secure Boot and enabled by default.
Re:Linux and Secure Boot certificate expiration
by salawat on Saturday July 19, 2025 @12:08PM
(#44616696)
Sounds anti-competitive as fuck to me. Maybe we should, I don't know; do something about companies using contractual requirements to lock key industrial into one way of doing things in order to shut down such efforts?
Re:Linux and Secure Boot certificate expiration
by pydry on Saturday July 19, 2025 @11:37AM
(#44616412)
"Will this piss off or delight Microsoft?" is probably a thought that goes through the heads of many OEMs when they decide how to design their machines.
Re:Linux and Secure Boot certificate expiration
by pydry on Saturday July 19, 2025 @12:26PM
(#44616860)
Microsoft has been trying to tread a fine line between exerting subtle pressure on OEMs to make Linux annoying to boot so it doesnt become more popular and not violating the terms of its antitrust agreement.
Re:Linux and Secure Boot certificate expiration
by vbezhenar on Saturday July 19, 2025 @11:10AM
(#44616142)
There's some link between secure boot and encryption.
If you don't do secure boot, you need to secure your boot chain in other ways, to prevent attacker from modifying your software to log entered passphrase.
Secure boot allows to build a verifiable chain of software (UEFI -> Bootloader -> Kernel -> Initrd) which will protect against any modification, so you can be sure that your key presses are not being logged by the malicious software. That said, commonly used Linux distros have some problems protecting initrd, but that's issue of those distros.
Another link is TPM. I set up my system in a way to keep encryption key in TPM and release it only when secure boot is enabled. This allows to decrypt root automatically, without entering passphrase and my configuration only allows to boot UKI kernel signed with my key. It trades security with convenience, of course (because now attacker, who stolen my computer, only has to break through gdm or perform other ways of attacks like extracting RAM sticks), but for me it's acceptable.
Re:Linux and Secure Boot certificate expiration
by craftkiller on Saturday July 19, 2025 @11:32AM
(#44616371)
That's like saying there is some link between putting locks on your doors and setting up booby traps because if you don't lock your doors then you need to set up booby traps to prevent a thief from stealing your stuff. They're both trying to mitigate the same threat, but there is no connection between the 40 pounds of explosives I have wired to my front door and an intricate metal cylinder that can only be manipulated by another piece of metal in a specific shape.
Re:Linux and Secure Boot certificate expiration
by bri3d on Saturday July 19, 2025 @11:41AM
(#44616455)
No, it’s like saying there is a link between putting locks on your door and making sure the lock can’t be replaced with one that takes someone else’s key, or worse one that copies the key that’s put into it. The threat models directly overlap.
Re:Linux and Secure Boot certificate expiration
by craftkiller on Saturday July 19, 2025 @12:04PM
(#44616654)
That's a good analogy to point out the weakness behind relying on encryption without secure boot but without going into the mechanism behind "making sure the lock can’t be replaced" people might incorrectly think "they're both about setting up locks and therefore they are linked" whereas "making sure the lock can’t be replaced" involves securing the environment that the lock is placed in, like "Make sure your hinges are not exposed so the door cannot be taken off its hinges from the outside and replaced with a seemingly identical door."
Re:Linux and Secure Boot certificate expiration
by ahoka on Saturday July 19, 2025 @11:26AM
(#44616306)
I think it’s primarily to avoid someone just putting your SSD into any other computer and access all files. Anything more is probably not a realistic threat to most people.
Re:Linux and Secure Boot certificate expiration
by em-bee on Saturday July 19, 2025 @01:28PM
(#44617443)
for most people that is an irrelevant threat model. people can steal my laptop, but if they don't know my passport they can't access my data. end of story. they would have to break into my laptop without stealing it to install any kind of tool that can read the password. how/when is that going to happen ever without you knowing it? you would have to be working on highly sensitive, and sought after stuff for someone to try that.
Re:Linux and Secure Boot certificate expiration
by craftkiller on Saturday July 19, 2025 @04:07PM
(#44618882)
Unless you're using a SED, your EFI system partition is unencrypted. It would be trivial to build a malicious copy of popular open source UEFI bootloaders (grub, refind, zfsbootmenu, etc), and a bootable USB stick that scans your EFI system partition, replacing your unencrypted bootloader with a malicious one. This attack could then be applied by relatively unskilled people in a couple minutes ("boot this flash drive, wait until the screen says "done", power it off"). I hope your laptop is never out of your possession for more than a couple of minutes! (For example, the TSA at the airport, geek squad or other repair centers, or classically an evil maid).
Re:Linux and Secure Boot certificate expiration
by jeroenhd on Saturday July 19, 2025 @12:05PM
(#44616668)
By default, the secure boot status is part of the TPM registers that are used to unseal the encryption key for your drive. That's because if you disable secure boot, or reconfigure it with different keys, any bootloader could just replay measurements from a normal Linux system to the TPM and unlock your drive.
Calling systemd-cryptenroll with --tpm2-pcrs would allow you to manually pick a set of options. I believe Bitlocker uses 0, 2, 7, and 11 (11 being an OS specific register rather than a spec-defined one), which is why firmware updates often make you re-enter your Bitlocker key. Some people choose to only record the secure boot state, relying on the firmware to validate its own updates and config, which means you don't need your recovery key after firmware updates as long as the secure boot state remains the same.
Not taking secure boot state into account makes the entire setup rather easy to bypass, but you could do it to make your setup harder to break while still protecting against the "thief steals my SSD but not my laptop" scenario.
Re:Linux and Secure Boot certificate expiration
by craftkiller on Saturday July 19, 2025 @03:41PM
(#44618672)
In addition to the great answer by jeroenhd, you also might have encrypted your secure boot signing keys with your TPM. This has the advantage that your signing keys can't be stolen so you know that your bootloader was signed on your specific physical machine. But this is not necessary, you can just store your signing keys on your SSD or anywhere/anyway you want.
Re:Linux and Secure Boot certificate expiration
by londons_explore on Saturday July 19, 2025 @11:14AM
(#44616185)
Things that might not get updates shouldn't use the current date/time when checking certificates. Instead, they should see if the certificate would have been valid on the day the firmware was compiled (ie. behaviour will never change through the passage of time alone).
Re:Linux and Secure Boot certificate expiration
by AnotherGoodName on Saturday July 19, 2025 @11:24AM
(#44616291)
Expired certificates should also at worst be a skippable warning. No one’s relying on certificates expiring for security. If you did you might have to wait many years for the expiration of a stolen certificate - lol!
It’s absolutely a minor “hey btw the certificate expired, check for an update” yet various systems treat certificate expiration as an end of the world lock it down scenario.
Re:Linux and Secure Boot certificate expiration
by londons_explore on Saturday July 19, 2025 @12:04PM
(#44616658)
There's gonna be a bunch of linux users who write a shutdown script to set the date back to 2015 then poweroff... And at startup, reset the date back to today using the internet.
Sounds like a cleaner solution than any of the ones in the article too!
Re:Linux and Secure Boot certificate expiration
by amluto on Saturday July 19, 2025 @11:26AM
(#44616303)
That seems to almost completely defeat the purpose of expiration. One could do a bit better by requiring the signed object to be timestamped by some sort of secure timestamping service. But then one should seriously consider the threat model that Secure Boot with default certificates is intended to defend against.
Re:Linux and Secure Boot certificate expiration
by AnotherGoodName on Saturday July 19, 2025 @11:38AM
(#44616417)
There is no purpose to the expiration in this particular case. If you have an expiry of say 24hours and constantly update that makes some sense - stolen certs get a very short time window.
If however you have an expiry of multiple years you clearly have no reason to have an expiry date at all. You can't possibly justify a security benefit, imagine reassuring people with "the stolen certificate is only valid for a few years!"
As in it was clearly a mistake to have an expiry date at all for this use case and the multi-year expiry date should have been a smell that tipped people off and made them ask "why do we have an expiry date at all for this?".
Re:Linux and Secure Boot certificate expiration
by londons_explore on Saturday July 19, 2025 @12:01PM
(#44616617)
If there were no certificate expiry, I could break into your system by finding some bankrupt company last trading in 1980 and stealing their keys to mint my own certificate.
With expiry dates, at least the pool of places you can break into to steal certificate signing keys isn't growing without bound.
Re:Linux and Secure Boot certificate expiration
by em-bee on Saturday July 19, 2025 @01:16PM
(#44617342)
there is a difference between the expiration of signing keys, and the expiration of the signature signed with those keys. the signature for a contract, or a bootloader, should remain valid indefinitely, even if the person/key is no longer allowed to sign contracts/bootloaders after some point of time.
Re:Linux and Secure Boot certificate expiration
by josephg on Saturday July 19, 2025 @02:13PM
(#44617890)
That sounds impossible to enforce. Key signing is done offline. If I have an expired signing key, what’s stopping me setting my clock back a few years, creating a new signature and signing it?
If the resulting key works indefinitely, the expiration date on my signing key is utterly meaningless.
Re:Linux and Secure Boot certificate expiration
by withinboredom on Saturday July 19, 2025 @02:29PM
(#44618070)
And what stops people from just logging into the bios and changing the date or pulling the clock battery? The point we're all making here is, at least for this application, is that an expiration is pointless.
Microsoft's Authenticode has been doing this for a long time, allowing a signature to be considered as valid long after the signing certificate expired.
Re:Linux and Secure Boot certificate expiration
by amluto on Saturday July 19, 2025 @01:55PM
(#44617723)
You can do almost as well by finding a piece of software with a code execution exploit early in boot that’s signed by the bank.
A different model would be to only allow a given EFI binary to be booted if it was installed before the deadline, but that might well have a different set of complications.
Re:Linux and Secure Boot certificate expiration
by Tuna-Fish on Saturday July 19, 2025 @11:59AM
(#44616606)
Even more, the "current date" comes from an external source that anyone with access to get new images on the machine can probably also manipulate. Setting the hardware clock is a normal operation available to the kernel.
Re:Linux and Secure Boot certificate expiration
by stefan_ on Saturday July 19, 2025 @03:23PM
(#44618501)
The day infosec nerds get rid of their unhealthy obsession with expiration and realize that systems irrecoverably breaking on an arbitrary random instant or requiring a true source of time to work are REALLY FUCKING INCOMPATIBLE with the real world, they might actually get something done. Until then, please don't bother the rest of us trying to get work done (and having to cleanup the mess you made - what do you mean you can't just update it?!)
Re:Linux and Secure Boot certificate expiration
by jacquesm on Saturday July 19, 2025 @11:57AM
(#44616582)
Can't you just disable the internet connection, set the BIOS clock to a date before the expiration date to boot from the secure installation media and then reset it to the proper time after the installation is complete?
Re:Linux and Secure Boot certificate expiration
by LocalH on Saturday July 19, 2025 @12:04PM
(#44616655)
It irks me that Microsoft managed to shim their way into the Linux boot process like this. No key signed by Microsoft should ever come into play when booting Linux, on a moral basis.
Re:Linux and Secure Boot certificate expiration
by ThrowawayR2 on Saturday July 19, 2025 @01:15PM
(#44617333)
Libre operating systems are coded to run on machines that conform to Microsoft's hardware standards and conformance tests (Windows HLK) that define Windows compatible hardware. Linux is shimming its way into Windows' boot process, not the other way around, even on machines sold with Linux from the manufacturer.
If you want to be clean on "a moral basis", whatever that means, the FSF would have to create their own hardware standard and persuade OEMs to adhere to it. Good luck.
Re:Linux and Secure Boot certificate expiration
by jacquesm on Saturday July 19, 2025 @02:26PM
(#44618041)
This is only the case because we let it be the case. Microsoft should have had zero influence on this. Consumer protection laws have utterly failed us.
Re:Linux and Secure Boot certificate expiration
by Sophia95 on Saturday July 19, 2025 @12:07PM
(#44616681)
TLDR Linux systems using Secure Boot rely on a Microsoft certificate (from 2011) that will expire on September 11, 2024. After that, new Linux installs using Secure Boot may fail to boot unless the system firmware includes Microsoft’s newer 2023 key and updating the key often requires a firmware update from hardware vendors which doesn’t always happen. It’s crazy that many users are relying on an outdated Microsoft key unknowingly (I will be checking if I’m among them smh) Also great that people are bringing awareness to this
Re:Linux and Secure Boot certificate expiration
by hcfman on Saturday July 19, 2025 @03:11PM
(#44618409)
Is there a reason why the secure boot thing could not have had several secure boot slots and each one independent of others? So that microsoft world could run securely and other people could boot their system securely out of another slot?
Just wondering what the technical reason would be that Microsoft had to control the whole of the PC??
Surely, the control of the boot environment and any the the boot shims could have been restricted to system that could boot out of said shim. Then the two worlds could have securely co-existed could they not ?
“Just” is doing a lot of heavy lifting in that solution.
https://wiki.archlinux.org/title/Unified_Extensible_Firmware...
Note sbctl is one of the easier tools to do this.
So, believing this is very, very hard.
If you don't do secure boot, you need to secure your boot chain in other ways, to prevent attacker from modifying your software to log entered passphrase.
Secure boot allows to build a verifiable chain of software (UEFI -> Bootloader -> Kernel -> Initrd) which will protect against any modification, so you can be sure that your key presses are not being logged by the malicious software. That said, commonly used Linux distros have some problems protecting initrd, but that's issue of those distros.
Another link is TPM. I set up my system in a way to keep encryption key in TPM and release it only when secure boot is enabled. This allows to decrypt root automatically, without entering passphrase and my configuration only allows to boot UKI kernel signed with my key. It trades security with convenience, of course (because now attacker, who stolen my computer, only has to break through gdm or perform other ways of attacks like extracting RAM sticks), but for me it's acceptable.
Personally, I do both secure boot and encryption.
Or is this just some technical detail that in practice is under the same tools and settings?
If you want, you can pick a different set of registers to use. The Arch wiki has a bunch of them: https://wiki.archlinux.org/title/Trusted_Platform_Module#Acc...
Calling systemd-cryptenroll with --tpm2-pcrs would allow you to manually pick a set of options. I believe Bitlocker uses 0, 2, 7, and 11 (11 being an OS specific register rather than a spec-defined one), which is why firmware updates often make you re-enter your Bitlocker key. Some people choose to only record the secure boot state, relying on the firmware to validate its own updates and config, which means you don't need your recovery key after firmware updates as long as the secure boot state remains the same.
Not taking secure boot state into account makes the entire setup rather easy to bypass, but you could do it to make your setup harder to break while still protecting against the "thief steals my SSD but not my laptop" scenario.
It’s absolutely a minor “hey btw the certificate expired, check for an update” yet various systems treat certificate expiration as an end of the world lock it down scenario.
Sounds like a cleaner solution than any of the ones in the article too!
It's much more likely that someone will write a driver that adds an offset to the clock, keeping the hw date in a safe range.
https://wiki.archlinux.org/title/Chrony#Real-Time_Clock
Code signing certificates are trending down in length. Ot recently dropped down from a max of 39 months to about 15 months.
If however you have an expiry of multiple years you clearly have no reason to have an expiry date at all. You can't possibly justify a security benefit, imagine reassuring people with "the stolen certificate is only valid for a few years!"
As in it was clearly a mistake to have an expiry date at all for this use case and the multi-year expiry date should have been a smell that tipped people off and made them ask "why do we have an expiry date at all for this?".
With expiry dates, at least the pool of places you can break into to steal certificate signing keys isn't growing without bound.
If the resulting key works indefinitely, the expiration date on my signing key is utterly meaningless.
Microsoft's Authenticode has been doing this for a long time, allowing a signature to be considered as valid long after the signing certificate expired.
https://learn.microsoft.com/en-us/windows/win32/seccrypto/ti...
A different model would be to only allow a given EFI binary to be booted if it was installed before the deadline, but that might well have a different set of complications.
If you want to be clean on "a moral basis", whatever that means, the FSF would have to create their own hardware standard and persuade OEMs to adhere to it. Good luck.
Just wondering what the technical reason would be that Microsoft had to control the whole of the PC??
Surely, the control of the boot environment and any the the boot shims could have been restricted to system that could boot out of said shim. Then the two worlds could have securely co-existed could they not ?