Ubuntu 计划在 26.10 版本中出于安全考虑移除 GRUB 的部分功能。
Ubuntu wants to strip some of GRUB features in 26.10 for security purposes

原始链接: https://discourse.ubuntu.com/t/streamlining-secure-boot-for-26-10/79069

Ubuntu 26.10 提议对其 GRUB 启动加载器进行重要的安全增强,通过在签名版本中移除若干功能来实现。此举旨在减少 GRUB 的攻击面,因为当前 GRUB 包含大量容易受到安全漏洞影响的解析器。 这些更改包括删除对 Btrfs、HFSplus、XFS 和 ZFS 文件系统的支持,仅保留 ext4、FAT、ISO9660 和 SquashFS。JPEG 和 PNG 等图像格式也将被移除。分区表支持将限制为 GPT 和 MSR,并且将取消对 LVM、大多数 RAID 配置以及 LUKS 加密的 /boot 分区的支持——需要一个原始的 ext4 /boot 分区。 这些更改引发了争论。人们对依赖 Btrfs 快照、RAID1、LUKS 加密和自定义 GRUB 主题的用户可能失去功能表示担忧。一些人建议切换到 systemd-boot,但由于需要支持旧 BIOS 系统和多重引导配置,其仅支持 UEFI 的特性是一个缺点。 Ubuntu 计划默认情况下禁用受影响系统升级到 26.10,而被移除的功能将在未签名的 GRUB 版本中仍然可用。

Ubuntu 26.10 计划出于安全原因移除一些 GRUB 功能,这引起了 Hacker News 社区的担忧。 拟议的更改可能会适得其反,让攻击者更容易修改启动文件,如 `grub.conf` 和内核命令行,从而可能禁用硬件安全检查和内核模块签名验证。 一个关键问题是计划移除对 `/boot` 分区上 LUKS 加密的的支持,即使对于完全加密的系统,也需要一个未加密的 `/boot`。评论员认为这会削弱安全性,尤其是在欧洲对全盘加密有合规性要求的情况下。 讨论还集中在 GRUB 的年龄和复杂性上,有人建议用 systemd-boot 等替代方案替换它(尽管有些人抵制进一步的 systemd 集成),甚至有人提议恢复使用 LILO。 许多人对 GRUB 复杂的设计感到沮丧,并认为在现代 UEFI 环境中,一个更简单的引导加载程序就足够了。 一些用户已经开始迁移到 Debian 或 Devuan 等发行版,以避免这些更改。
相关文章

原文

Ubuntu systems support secure boot using grub. grub contains a lot of parsers for file systems and other things which are a constant source of security issues.

In 26.10, we’d like to propose removing the following features from signed GRUB builds:

  • Filesystems
    • Remove btrfs, hfsplus, xfs, zfs
    • Retain ext4, fat, iso9660 (and squashfs for snaps)
  • Image formats:
    • Remove jpeg, png
    • Retain none
    • We do not use images, but using that in your grub.cfg locally is a massive security risk (if even still allowed)
  • Partition tables:
    • Remove part_apple
    • Retain part_gpt and part_msod
  • Support for LVM
  • Support for md-raid; except raid1.
  • Support for LUKS-encrypted disks

In effect systems must boot with /boot on a raw ext4 partition (whether a separate or inside of /); on GPT or MBR disks.

This means for example, that an encrypted system must use an ext4 /boot partition; it is no longer possible to encrypt the /boot partition. Likewise a system on ZFS, XFS, BTRFS must use an ext4 /boot partition.

RAID systems are usually set up by mirroring the /boot partition, rather than putting /boot on a RAID natively, so this should not be a substantial loss.

We understand these are controversial options; however we believe they’d substantial improve security, but also simply pivoting to new boot solutions in the future.

The features will continue to be available without secure boot and security support.

Affected systems will by default stay on 26.04 LTS, that is, the upgrade will be disabled in ubuntu-release-upgrader.

4 Likes

Can we please not drop btrfs? It’s a read-only filesystem driver that is actively supported by upstream developers. Users who want to leverage boot-to-snapshot setups with Btrfs need this support.

That’s not my experience with users. Software RAID1 is incredibly common. It would indeed be a substantial loss.

2 Likes

Have you considered switching to systemd-boot instead? It’s the minimal bootloader you’re looking for, and it integrates into systemd-based systems well anyway.

4 Likes

except Raid 1

I think they are implying raid1 wouldn’t be removed but other raid types would

systemd-boot is UEFI only, grub supports both BIOS and UEFI

Do you really want to support >=20 years old systems?

2 Likes

Most web hosting/cloud/VPS environments today don’t support UEFI today, either. So yes, we do.

And even if you exclude that and focus on desktop/server systems, a lot of UEFI implementations have been unusably broken prior to 2017, so only the last decade of PCs have things in useful enough order.

Also, GRUB supports more than x86, and Ubuntu is a multi-arch platform, supporting platforms that neither IBM/Phoenix BIOS (and descendants) nor UEFI exist. A common bootloader drastically simplifies the maintenance burden on that front.

2 Likes

To add to the reply by @Conan_Kudo, bear in mind that many people have dual-boot or multi-boot systems, not all of which necessarily support UEFI.

1 Like

Some Ubuntu flavors have grub themes, and I know those use images. I don’t think you can yank this since it’s something flavor customization relies on.

2 Likes

Does this mean that LUKS2 encrypted /boot partitions will not be allowed? I have (although manually) set on my development 26.04 system encrypted /boot partition with ext4 and LUKS2 (pbkdf) and everything works correctly.

In my personal opinion removing support for LUKS2-encrypted /boot partition isn’t wise unless GRUB2’s encryption implementation defeats security enhancements provided by encrypted /boot

3 Likes

I would be terribly disappointed if you were to remove images. At the moment, we can use PNG and JPEG. Supposedly, TGA is also supported, but I’ve been unable to make it work.

I’ve been seeing my welcoming Ubuntu background when I boot for many years!

From what I’ve read, the security vulnerabilities affect only versions of Grub prior to 2.12, and TGA doesn’t present a vulnerability.

1 Like

To add to @tomekdev’s comment, surely Grub must support both LVM and LUKS? LUKS is an industry standard within Linux, so how would we boot without its support? LVM is also common. My system uses both LVM and LUKS.

I don’t know, if it’s a real deal then I understand and of course accept it. In the meantime, as a normal user I feel like I have to struggle more to get what I want. We had a simple timeshift btrfs layout yearso ago and that was taken away, now relying on scripts that not always work - especially on 26.04. Needing to setup a different /boot partition in order to have btrfs, xfs and zfs does feel strange, just as choosing a driver on 26.04.

Please explain why.

If one has the privileges to change the boot picture, couldn’t that person also change other boot parameters?

Setting a GRUB theme is the easiest way to make the boot just a bit less ugly and partially hide the embarrassing obsolescence of GRUB.

In effect systems must boot with /boot on a raw ext4 partition (whether a separate or inside of /); on GPT or MBR disks.

Full disk encryption is mandatory in many environments in Europe for security conformity. So support for encrypted /boot (via LUKS) is important.

联系我们 contact @ memedata.com