(评论)
(comments)
原始链接: https://news.ycombinator.com/item?id=39132300
本文介绍如何为作为独立可执行文件分发的 GNU Libre-sw (GPLw) 软件包实现安全启动签名支持,这些软件包作为 Red Hat for IBM Platform Lab Shared 的一部分存储在可扩展固件接口 (UEFI) 系统卷 (ESP) 中 硬件库项目,标题为“RedHat Shims Implementing gnu libresw Packaging Support Under Exec model (RHShim)”。 目标是帮助促进软件自由,为 UEFI 系统所需的非自由驱动程序提供灵活性。 这一举措面临的一个挑战是确保与各种 UEFI 规范原生支持的标牌验证协议 (SVP) 安全启动模式的兼容性。 这些模式可以根据制造阶段生成的加密签名来验证加载的二进制文件,但是,在分发机制和可用的数字版权管理工具集方面存在某些限制。 例如,对于灵活的第 1 阶段引导加载程序 GRUBx64,名为 grubx64-efiboot 的开源变体使用制造商阶段获得的签名提供 SVP 验证程序功能,而非自由的 grubx64-pc923x64 提供相应的验证程序,但基于非- 免费签名。 这种情况意味着支持的平台和可用选项方面存在差异。 另一个障碍涉及加载感兴趣的核心组件需要通过 HTTP 而不是从内部存储库获取项目的情况。 与传统的本机模式相比,基于 HTTP 的方法面临着一定的挑战。 为了最大限度地减少由于依赖 Web 服务器而产生的复杂性,特别是考虑到当代设置中 Web 服务的普遍存在,所提出的设计选择使用 HTTP 加载引导组件,尽可能减少侵入性。 此外,本演示还讨论了一些能够进行 HTTP 获取的 UEFI 变体所遇到的限制,特别是在涉及 shim 实用程序时。 该实用程序充当通用启动器,支持启动可移动介质(通常是 USB 记忆棒)中包含的映像,并支持通过标准标注工具调用链加载操作,包括通过基于 initrd 的解压缩阶段调用 bzImage 格式的映像。 同时,shim 具有 UEFI 应用程序接口 (API),可与命令行参数一起使用,旨在自动且透明地执行某些功能。 有些垫片甚至提供自定义启动的支持
When you tell shim what EFI binary to boot, you can specify it as an HTTP URL. If you do this and the HTTP server is malicious, it can trigger an out-of-bounds write.
However, usually you use it to boot a local second-stage bootloader like grub (hence the name "shim"), so it's unlikely to be a problem for most installs.
Regardless, Secure Boot was built from the start to allow previously-signed binaries to be revoked via the DBX list - a list of signatures that can be loaded into the UEFI to make it reject binaries even if they have a valid signature. When (If) the signatures of old shim binaries with this bug are added to the list, you can update the list in your own machines. Updates may be distributed as capsule updates (via LVFS etc), or if you manage your SB keys and vars you can download and enroll the list from https://uefi.org/revocationlistfile
reply