← 返回日报
略读 预计 9 分钟

Linux and Secure Boot certificate expiration

摘要

文章梳理了 Linux Secure Boot 信任链中微软 2011 UEFI 第三方签名证书即将于 2025 年 9 月 11 日到期带来的连锁影响。目前 Linux 发行版使用的 shim 第一阶段引导器依赖该证书签名;到期后,新的安装介质必须改用微软 2023 证书签名的 shim,否则无法在 Secure Boot 环境下启动安装程序。已安装系统通常使用发行版自己的密钥继续维持信任链,因此大概率不会立即失效。 问题在于大量设备固件数据库中未预装微软 2023 新证书,部分设备需要厂商发布固件更新,或通过 LVFS / fwupd 分发 KEK(Key Exchange Key)和数据库更新来补齐。fwupd 近年已增强对此类更新的支持,但仍存在 EFI 变量空间不足、更新失败、旧 BIOS 兼容性差等已知问题,维护者给出的数据也显示更新并非 100% 成功。 文章进一步讨论了更棘手的边缘情况:部分厂商可能不再为旧硬件提供更新;有厂商甚至丢失了平台密钥(PK)对应私钥;KEK 更新机制此前几乎没有实际大规模使用经验,BIOS 厂商实现可能存在缺陷。对于无法获得更新的设备,关闭 Secure Boot 可能成为唯一可行方案。 作者还提到一个尚不明确的问题:固件是否会严格执行 2011 证书的到期时间。如果不严格检查,现有基于旧证书构建的启动链可能在 9 月后仍能工作,但之后任何新的 shim 安全更新都无法再使用已过期证书获得微软签名,因此继续依赖旧 shim 会削弱 Secure Boot 的安全意义。整体来看,这是一场涉及微软、硬件厂商、发行版维护者和用户协同完成的迁移工作。

荐读理由

用 fwupd 工具更新 LVFS 的 EFI 变量来添加 Microsoft 2023 密钥,避免新装 Secure Boot 系统无法引导;厂商提供 firmware 更新或 KEK 更新是备份选项

原文

By Jake Edge July 16, 2025

Linux users who have Secure Boot enabled on their systems knowingly or unknowingly rely on a key from Microsoft that is set to expire in September. After that point, Microsoft will no longer use that key to sign the shim first-stage UEFI bootloader that is used by Linux distributions to boot the kernel with Secure Boot. But the replacement key, which has been available since 2023, may not be installed on many systems; worse yet, it may require the hardware vendor to issue an update for the system firmware, which may or may not happen. It seems that the vast majority of systems will not be lost in the shuffle, but it may require extra work from distributors and users.

Mateus Rodrigues Costa raised the issue on the Fedora devel mailing list on July 8. He had noticed a warning that came with "this month's Windows 11 cumulative update"; it talked about Secure Boot certificates that are scheduled to expire starting in June 2026. Those particular certificates are separate from the one used for shim, which expires much sooner. In any case, the problem of certificate expiration is one that the Linux world will need to tackle.

The situation is rather complicated. Daniel P. Berrangé pointed to a page at the Linux Vendor Firmware Service (LVFS) site that describes it. LVFS is the home of fwupd and other tools that are used to update system firmware from Linux. LVFS and fwupd are the subject of an LWN article from 2020.

There are multiple moving parts to the problem. In order to do a Secure Boot into the Linux kernel, the UEFI boot process requires the first-stage bootloader to be signed with a key in the firmware database that has not expired. Those keys are contained in certificates, which have other information, such as an expiration date and signature(s). The certificate expiration should largely only be a problem when installing a new distribution on a Secure Boot system; the shim that gets installed will have distribution-specific keys and can act as the root of trust for running other programs (e.g. GRUB) using those keys.

Currently, shim is signed with a Microsoft key from 2011 that expires on September 11. Past that point, installation media will no longer boot unless it has an updated shim that is signed with the Microsoft 2023 UEFI key for third-parties (which is different than the specific key mentioned in the Windows update). Any installed distribution should have a bootloader signed with its own key that will continue to boot.

But there are lots of systems out there with a firmware database that lacks Microsoft's new key, some have both old and new keys, while there are likely some that only have the new key and cannot Secure Boot Linux installation media at all at this point. Vendors can (and hopefully most will) provide firmware updates that add the new key, and installation media can be created with a shim signed by it, but those updates have to be installed on systems. That's where LVFS and fwupd come in.

LVFS is a repository of vendor-firmware updates of various sorts, which fwupd and other tools can use to install the pieces that are needed into the firmware from Linux. Berrangé noted that older versions of fwupd were unable to solve all of the problems, "but recent releases have been enhanced to handle the updates that Linux users will need to see, which should mitigate the worst of the impact". There may still be a bit of a bumpy ride, however: "Users should be 'aware' of the potential for trouble, but hopefully the worst of the 'worry' part is handled by the OS vendors and maintainers."

LVFS creator and maintainer Richard Hughes agreed, noting that there were various ways that people's systems would be able to get updated Secure Boot functionality. A full firmware update might be provided by the vendor, which would (presumably) add the new database, including the new Microsoft key. Another avenue would be a "key exchange key" (KEK) update, which is a vendor-specific key that is signed by the Microsoft key; it can be used by fwupd to update the database with the new key. But there are some caveats:

The KEK updates are going out at ~98% success, and db update is ~99% success -- but even 1% multiplied by millions of people is a fair few failures to deploy -- the "failed to write efivarfs" thing. What fixes it for some people is rebooting and clearing the BIOS to factory defaults -- this has the effect of triggering a "de-fragmentation" of the available efivar space so that there's enough contiguous space to deploy the update. The older your BIOS the more likely you are to hit this.

Hughes is referring to a known problem with space for new EFI variables.

For systems where the vendor provides no updates, disabling Secure Boot may be the only option to allow a new install. In a few short months, all existing installation images and media will not be installable with Secure Boot—that may already be true for systems that only have the new key. Secure Boot installation just got that much more complicated.

Beyond that, though, is the possibility of mistakes or problems with the vendor updates. Hughes pointed out that at least one manufacturer has lost access to the private part of its platform key (PK), which is a vendor-specific key burned into the hardware when it is made. That means the platform keys in the hardware need to be changed, which is uncharted water and "a terrible idea from an attestation point of view". In addition, as Gerd Hoffman pointed out, the KEK update process is new as well: "a KEK update has never happened before so there are chances that bios vendors messed up things and updating the KEK doesn't work".

The thread has multiple reports on the Secure Boot certificates on various hardware models, as well as reports of updates to the KEK and database. One thing that is not entirely clear is whether the firmware implementations will actually enforce the expiration date on the 2011 key. A working system with a functional trust-chain based on that key might continue to work with a shim signed with that key, even after September. Any shim updates, for, say, security problems, would not be able to be signed with the old key, however—Microsoft will not sign anything using the expired key. That may lead to a "solution" of sorts, as Adam Williamson said:

In theory wouldn't we also have the option to ship an old shim for such cases? If the whole chain is old it should work, right? Of course, we'd then need some heuristic to figure out if we're on the old MS cert and install the old shim...

He said that it may not really make sense and users should just disable Secure Boot. Hoffman agreed with all of that, but pointed out the problem with shim updates: "Continuing running shim with known security bugs makes it [kinda] pointless to have secure boot turned on".

All in all, it seems like the Linux world is doing the best it can under the circumstances—as is so often the case when it comes to hardware from vendors that mostly care about Windows. Given that the Secure Boot root-of-trust keys (both the platform key and the signing key) are under the control of vendors—Microsoft and the hardware makers—it is always going to be a bit of a struggle to keep up. Since older hardware is something that Linux and distributions explicitly support, while the other vendors have long since moved on to the latest shiny, it was clearly going to lead to some tension there. One can only hope that the ride is as smooth as it can be.


Press X to doubt

Posted Jul 16, 2025 19:39 UTC (Wed) by kraxel (subscriber, #49444) [Link] (2 responses)

Press X to doubt

Posted Jul 17, 2025 15:32 UTC (Thu) by pjones (subscriber, #31722) [Link] (1 responses)

Press X to doubt

Posted Jul 19, 2025 13:51 UTC (Sat) by patrakov (subscriber, #97174) [Link]

Press X to doubt

Posted Jul 16, 2025 21:33 UTC (Wed) by stevem (subscriber, #1512) [Link]

What about custom keys?

Posted Jul 16, 2025 18:53 UTC (Wed) by das_j (subscriber, #143082) [Link] (3 responses)

What about custom keys?

Posted Jul 16, 2025 19:11 UTC (Wed) by daroc (editor, #160859) [Link]

What about custom keys?

Posted Jul 16, 2025 19:20 UTC (Wed) by heftig (subscriber, #73632) [Link]

What about custom keys?

Posted Jul 21, 2025 20:01 UTC (Mon) by kelnos (subscriber, #174370) [Link]

System time

Posted Jul 16, 2025 19:14 UTC (Wed) by tux3 (subscriber, #101245) [Link] (9 responses)

System time

Posted Jul 17, 2025 0:02 UTC (Thu) by mathstuf (subscriber, #69389) [Link] (1 responses)

System time

Posted Jul 17, 2025 8:02 UTC (Thu) by taladar (subscriber, #68407) [Link]

System time

Posted Jul 17, 2025 8:32 UTC (Thu) by aaribaud (subscriber, #87304) [Link] (6 responses)

System time

Posted Jul 18, 2025 0:35 UTC (Fri) by marcH (subscriber, #57642) [Link] (5 responses)

System time

Posted Jul 18, 2025 21:03 UTC (Fri) by Lwnkhz (guest, #178382) [Link] (4 responses)

System time

Posted Jul 18, 2025 21:18 UTC (Fri) by mjg59 (subscriber, #23239) [Link] (3 responses)

System time

Posted Jul 18, 2025 22:06 UTC (Fri) by aaribaud (subscriber, #87304) [Link] (2 responses)

System time

Posted Jul 18, 2025 22:54 UTC (Fri) by mjg59 (subscriber, #23239) [Link] (1 responses)

System time

Posted Jul 19, 2025 4:48 UTC (Sat) by aaribaud (subscriber, #87304) [Link]

Multiple Microsoft secure boot keys expiring in 2026

Posted Jul 16, 2025 19:48 UTC (Wed) by ewen (subscriber, #4772) [Link] (1 responses)

Multiple Microsoft secure boot keys expiring in 2026

Posted Jul 16, 2025 19:59 UTC (Wed) by ewen (subscriber, #4772) [Link]

Why?

Posted Jul 16, 2025 20:15 UTC (Wed) by mb (subscriber, #50428) [Link] (9 responses)

Why?

Posted Jul 16, 2025 22:56 UTC (Wed) by NYKevin (subscriber, #129325) [Link] (7 responses)

Why?

Posted Jul 17, 2025 4:57 UTC (Thu) by kraxel (subscriber, #49444) [Link]

Why?

Posted Jul 17, 2025 6:17 UTC (Thu) by mb (subscriber, #50428) [Link] (3 responses)

Why?

Posted Jul 19, 2025 7:50 UTC (Sat) by epa (subscriber, #39769) [Link] (2 responses)

Why?

Posted Jul 19, 2025 19:58 UTC (Sat) by raven667 (guest, #5198) [Link] (1 responses)

Why?

Posted Jul 21, 2025 8:12 UTC (Mon) by taladar (subscriber, #68407) [Link]

Why?

Posted Jul 17, 2025 8:45 UTC (Thu) by epa (subscriber, #39769) [Link]

Why?

Posted Jul 17, 2025 15:00 UTC (Thu) by jem (subscriber, #24231) [Link]

Why?

Posted Jul 17, 2025 18:03 UTC (Thu) by wtarreau (subscriber, #51152) [Link]

Installers

Posted Jul 16, 2025 22:03 UTC (Wed) by comex (subscriber, #71521) [Link] (4 responses)

Installers

Posted Jul 17, 2025 1:22 UTC (Thu) by jreiser (subscriber, #11027) [Link]

Installers

Posted Jul 17, 2025 11:00 UTC (Thu) by jengelh (subscriber, #33263) [Link] (1 responses)

Installers

Posted Jul 18, 2025 6:50 UTC (Fri) by kraxel (subscriber, #49444) [Link]

Installers

Posted Jul 18, 2025 13:50 UTC (Fri) by pjones (subscriber, #31722) [Link]

Vendor-specificity of KEK

Posted Jul 17, 2025 13:19 UTC (Thu) by linuxtardis (guest, #178362) [Link] (4 responses)

Vendor-specificity of KEK

Posted Jul 18, 2025 1:08 UTC (Fri) by marcH (subscriber, #57642) [Link]

Vendor-specificity of KEK

Posted Jul 19, 2025 10:08 UTC (Sat) by linuxtardis (guest, #178362) [Link] (2 responses)

Vendor-specificity of KEK

Posted Jul 19, 2025 20:12 UTC (Sat) by raven667 (guest, #5198) [Link] (1 responses)

Vendor-specificity of KEK

Posted Jul 19, 2025 20:31 UTC (Sat) by linuxtardis (guest, #178362) [Link]

September expiration date

Posted Jul 17, 2025 17:30 UTC (Thu) by linuxtardis (guest, #178362) [Link]

Old hardware?

Posted Jul 18, 2025 4:55 UTC (Fri) by pabs (subscriber, #43278) [Link] (3 responses)

Old hardware?

Posted Jul 18, 2025 13:57 UTC (Fri) by pjones (subscriber, #31722) [Link] (1 responses)

Old hardware?

Posted Jul 18, 2025 23:39 UTC (Fri) by pabs (subscriber, #43278) [Link]

Old hardware?

Posted Jul 19, 2025 8:30 UTC (Sat) by linuxtardis (guest, #178362) [Link]

Wyse 5070 Thin Client died today

Posted Aug 27, 2025 21:46 UTC (Wed) by mwerszner (guest, #179034) [Link] (1 responses)

Wyse 5070 Thin Client died today

Posted Aug 27, 2025 22:18 UTC (Wed) by mjg59 (subscriber, #23239) [Link]

Lobsters · 4 赞 · 0 评 讨论 → 阅读原文 →

这条对你有帮助吗?