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 的 GRUB 变更引发安全担忧 Ubuntu 计划在 26.10 版本中移除 GRUB 的一些功能,理由是出于安全改进。然而,这在技术社区引发了担忧,主要集中在一个限制上,即对于加密系统,需要一个未加密的 `/boot` 分区。 批评者认为这一改变*增加了*攻击面,允许修改启动文件,如 `grub.conf` 和内核命令行,从而可能使攻击者能够禁用安全特性,例如机器检查异常和内核模块签名验证。虽然有人建议使用安全启动和 UKI 镜像等解决方案,但也有人指出这些替代方案的复杂性和局限性。 这场讨论凸显了 systemd 影响力日益增强以及安全性和灵活性之间的权衡。许多评论者对 Ubuntu 偏离既定标准的历史表示沮丧,并提倡使用 Debian 和 Devuan 等替代发行版,这些发行版优先考虑用户控制并避免 systemd 依赖。核心问题在于,简化启动过程是否真的能增强安全性,还是仅仅改变了漏洞的位置。
相关文章

原文

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