Ubuntu's GRUBby plans
GNU GRUB 2, mostly just referred to as GRUB these days, is the most widely used boot loader for x86_64 Linux systems. It supports reading from a vast selection of filesystems, handles booting modern systems with UEFI or legacy systems with a BIOS, and even allows users to customize the "splash" image displayed when a system boots. Alas, all of those features come with a price; GRUB has had a parade of security vulnerabilities over the years. To mitigate some of those problems, Ubuntu core developer and Canonical employee Julian Andres Klode has proposed removing a number of features from GRUB in Ubuntu 26.10 to improve GRUB's security profile. His proposal has not been met with universal acclaim; many of the features Klode would like to remove have vocal proponents.
Ubuntu provides two versions of GRUB: one for UEFI systems
that enables Secure Boot (referred to as the "signed" builds), and another
for systems with legacy BIOS or systems that otherwise don't support Secure
Boot (the "unsigned" builds). The unsigned GRUB builds from Ubuntu would
continue to have the existing set of features, but
Klode is looking to strip quite a bit out of signed GRUB builds; he proposes
removing support for reading /boot partitions that use Btrfs, HFS+,
XFS, or ZFS filesystems. That would leave ext4, FAT, ISO 9660, and
SquashFS. He also wants to disable features to use custom PNG and JPEG splash
images, and strip out support for "complex partition setups such as LVM,
md-raid (except raid1), and LUKS-encrypted /boot
" because those were not
tested nor used by the Ubuntu installer.
As for encryption in particular, encryption of /boot only provided security by obscurity, but not actual security. You want to ensure the integrity of those pieces. Our TPM [full-disk encryption (FDE)] solution correctly implements integrity in the early boot stage, and we are committed to keep iterating and improve it.
None of these changes would affect Ubuntu's support for the filesystems in general; users could still have (for example) a Btrfs partition for user data. They simply could not use Btrfs for /boot. The changes are not scheduled for the upcoming long-term-support (LTS) release, 26.04, which is due in April. Thus, he said, affected users (those who want the features being removed) would have the option of staying on an LTS release with the GRUB features for up to ten years.
Klode isn't the first person to decide that GRUB has too much complexity and too many features that pose security problems. For example, GRUB maintainer Marta Lewandowska has advocated getting rid of bootloaders altogether in favor of Unified Kernel Images (UKIs).
Pushback
Dropping features from an upstream application is rarely popular, as Klode no
doubt discovered when turning off
optional KeePassXC features in the Debian package he maintains. The tactic has
proven no more popular with GRUB. Neal Gompa was first in line to object
to Klode's plans; specifically, he complained about dropping Btrfs support. He
argued that the support was necessary for those who want to use boot-to-snapshot
setups. User "haroldw" pointed
out that it is unnecessary, and perhaps undesirable, for /boot to be Btrfs-formatted
for snapshot support to work: "Grub doesn't respect the
default btrfs subvolume settings leading to easy breakage and requiring to modify
kernel parameters in grub.cfg.
" Gompa did not seem to be persuaded, and still
wanted to be able to use Btrfs features to resize /boot if
desired.
Quite a few people wanted to preserve support for JPEGs and PNGs. Gompa, for
example, argued
against removing support since some of the Ubuntu flavors use images as part of
their branding. Sebastian Schneeland not only objected to removing image support, but
wished
for an easier way to make a graphical boot menu with friendly labels for each
entry. Paddy Landau said
that he would be disappointed if Ubuntu removed image support. "I've been
seeing my welcoming Ubuntu background when I boot for many years!
"
Some suggested ditching GRUB entirely. Andreas Schildbach (and others) asked
about switching Ubuntu to systemd-boot instead. "It's the
minimal bootloader you're looking for, and it integrates into
systemd-based systems well anyway.
" However, Tobiyo Kuujikai pointed
out that systemd-boot only supports UEFI systems. That would
likely be a non-starter, since Ubuntu would then need to support not
just two different builds of GRUB, but two entirely different boot
loaders, which would no doubt require changes in its installer, how it
handles kernel updates, and more.
Robie Basak asked
for Klode to cite specific security issues that could have been avoided if the change
had happened earlier "given that these security issues of the past are the sole
motivation for this change
". Thomas Ward, a member of Ubuntu's Community
Council and its Technical
Board, said that Klode's proposal needed further discussion as well as "a
deeper explanation of how this is going to improve security for each dropped
item
". He said that Ubuntu would be alienating the majority of its users and
requiring organizations with specific requirements to forgo the use of Secure
Boot.
I want to hear the Foundation team's reason for each removal. If you are unable to provide an ample justification for each removal, then the Foundations team needs to not abandon existing feature sets on the basis that "it makes GRUB Signed more bare and thus more secure because there's less open holes for risks".
While Klode did not reply with specific examples, Tobias Heider supplied
a list of 11 recent CVEs "that would have been avoided by not shipping drivers
that Ubuntu doesn't actually use
", including CVE-2024-45774, which affected
GRUB's JPEG parser. The flaw could allow an attacker to supply a "specially
crafted JPEG
" that would cause GRUB to perform an out-of-bounds write, that in
turn might allow a Secure Boot bypass.
If you go through the list of CVE search results you will find that there are plenty and often in parts that Ubuntu doesn't actually use or support in any way.
Keep in mind the grub drivers are only ever needed to get to the kernel and initrd files which are on the /boot partition, after that we use the kernel drivers for LUKS and file systems.
Signed, sealed, delivered
Users were also concerned about not having LUKS encryption for the
/boot partition, and the impact on full-disk encryption
(FDE). There was a fair bit of discussion and disagreement about the
need for /boot encryption. Klode's position is that
encrypting the partition did little to enhance security; that stance
found a number of supporters. Peter White argued
that it was more important to validate everything used in the boot
process against cryptographic signatures. "The chain of trust
doesn't hinge on everything being encrypted, but on everything being
validated against cryptographic signatures; it's about
integrity/verity rather than confidentiality.
" Mate Kukri agreed:
"The only solution to this issue is the bootloader to actually
enforce initrd signing, /boot encryption and even optional initrd
signing is a completely inadequate defense.
"
Klode replied that Canonical had been working to address FDE integrity concerns by making its TPM-backed FDE boot flow available for Ubuntu Desktop in the 26.04 release, though it is not yet available for Ubuntu Server.
Our TPM FDE solution ensures that the initrd is verified at boot time (it is part of a [unified kernel image (UKI)] for now), and more importantly measured, and the unlocking of the root partition is sealed to that measurement, meaning you cannot even replace the initrd with another validly signed one.
Steven Maddox said
that Klode's proposal was the opposite of what he was hoping for. GRUB 2.14,
which will be included in 26.04, had just added support for the default encryption used
with LUKS2; now it would be removed in Ubuntu 26.10. He complained that users would
be stuck with unencrypted /boot partitions of a fixed size "where we
have to try and forever judge how big they should be for future kernels and
such
". He also worried about bad actors being able to modify GRUB's
configuration files in the unencrypted partition. White replied
that bad actors would not get very far "because they can't coerce GRUB2 into
opening an initrd that's not the sealed one
". Encryption of the
/boot partition, he said, was never a sufficient security measure.
Discussion of the proposal continues. Klode's last appearance in the thread, so far, was on March 27, when he replied about the TPM-backed FDE boot flow. It is not clear whether there is any deadline for feedback or whether any of the objections might alter the plans for stripping features out of GRUB signed builds. It will be interesting to see if any other Linux distributions consider following suit, or if Ubuntu will be alone in trying to streamline GRUB for security reasons.
