Skip to content

grub update - #640

Draft
piyush-jena wants to merge 2 commits into
bottlerocket-os:developfrom
piyush-jena:grub-update/kernel-kit
Draft

piyush-jena wants to merge 2 commits into
bottlerocket-os:developfrom
piyush-jena:grub-update/kernel-kit

Conversation

@piyush-jena

@piyush-jena piyush-jena commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Description of changes:

This PR moves grub from AL2023's grub2-2.06-61.amzn2023.0.18 source to .0.24, the latest published. AL added 19 patches (1077-1095) and dropped none.

SBAT moves from grub,5 to grub,6. Shim is unchanged: shim 16.1 enforces at most grub,5, so neither the old nor the new grub is revoked, and rollback and downgrade keep working.

6f67399 grub: update to 2.06-61.amzn2023.0.24   Cargo.toml URL/sha512, Source0
34e7a80 grub: increment SBAT                    sbat.csv.in grub,5 -> grub,6

Testing done:

AMIs were registered uefi-preferred with local Secure Boot keys, in us-west-2.

  • Built kernel-kit for x86_64 and aarch64, and built the aws-k8s-1.31, aws-k8s-1.33 and aws-k8s-1.36 AMIs (both arches), vmware-dev (OVA) and metal-dev (raw).

    grub,6,Free Software Foundation,grub,2.06,https://www.gnu.org/software/grub/
    grub.bottlerocket,1,Bottlerocket,grub,2.06,https://github.com/bottlerocket-os/bottlerocket/blob/develop/SECURITY.md
    

    For every image (aws-k8s-1.31/1.33/1.36, vmware-dev, metal-dev): every section of the image's grubx64.efi/grubaa64.efi except .pubkey equals the RPM's. For each AMI, the host's EFI-SYSTEM sha256 equals its AMI snapshot's. BIOS-BOOT differs from the RPM's core.img only in the bytes grub-bios-setup writes: 7 differing bytes, all in [1,512] or [529,532].

  • UEFI Secure Boot, baseline + host checks, Functional: PASS / Clean logs: PASS on all 6 (m5.large x86_64, m6g.large aarch64; aws-k8s-1.31 kernel 6.1, 1.33 kernel 6.12, 1.36 kernel 6.18). Example, aws-k8s-1.36 x86_64:

    $ journalctl -k -b | grep -i -E 'secure ?boot|locked down'
    kernel: Secure boot enabled
    kernel: Kernel is locked down from securityfs; see man kernel_lockdown.7
    $ grep -a -o '^grub[.a-z]*,[0-9]*,[^,]*' /dev/disk/by-partlabel/EFI-SYSTEM
    grub,6,Free Software Foundation
    grub.bottlerocket,1,Bottlerocket
    $ cat /proc/cmdline
    ... BOOT_IMAGE=/vmlinuz console=tty0 console=ttyS0,115200n8 ...
    $ systemd-analyze
    Startup finished in 793ms (firmware) + 678ms (loader) + 655ms (kernel) + 7.634s (userspace) = 9.761s

    SbatLevelRT is unchanged from the .18 AMI on both arches (sbat,1,2024040900 shim,4 grub,4 grub.peimage,2). Loader time, old .18 vs new .24 on aws-k8s-1.36: x86_64 691ms vs 678ms, aarch64 434ms vs 394ms.

  • Legacy BIOS with uefi-preferred, m4.large (Xen), aws-k8s-1.31/1.33/1.36 x86_64, all PASS / PASS: CurrentInstanceBootMode legacy-bios, /sys/firmware/efi absent, BIOS-BOOT equal to the AMI snapshot, SBAT grub,6. The console shows grub booting: Booting `Bottlerocket OS 1.69.1'.

  • In-place update from the .18 AMI (aws-k8s-1.36, m5 / m6g / m4 BIOS, all PASS). The 1.69.0 host (old grub) updated to 1.69.1 (this change) and came back healthy. EFI-SYSTEM and BIOS-BOOT were unchanged, so the old grub booted the new release.

  • A/B under the new grub (aws-k8s-1.36 AMI with .24, m5 / m6g / m4 BIOS, all PASS). Each step booted the expected version, healthy:

    1. first boot 1.69.1;
    2. updog update to 1.69.2;
    3. signpost rollback-to-inactive back to 1.69.1;
    4. automatic rollback: update again, zero the first MiB of the new root, reboot. The host came back on 1.69.1 in 39 s;
    5. downgrade to 1.69.0.

    From step 4 (x86_64):

    device-mapper: verity: 259:11: data block 0 is corrupted
    Restarting system with command 'dm-verity device corrupted'
      Booting `Bottlerocket OS 1.69.1'
    $ signpost status
    Set A:   boot=/dev/nvme0n1p3 root=/dev/nvme0n1p4 hash=/dev/nvme0n1p5 priority=1 tries_left=0 successful=true
    Set B:   boot=/dev/nvme0n1p8 root=/dev/nvme0n1p9 hash=/dev/nvme0n1p10 priority=2 tries_left=0 successful=false
    Active:  Set A
    Next:    Set A

    EFI-SYSTEM and BIOS-BOOT stayed constant across all five steps.

  • metal-dev under QEMU (m8i.large nested virt, QEMU 11.1.3, edk2-ovmf with the local keys enrolled), x86_64:

    • With local keys, the serial log shows BdsDxe: starting Boot0002 …, Linux version 6.1.190 …, Command line: BOOT_IMAGE=/vmlinuz …, Secure boot enabled, Welcome to Bottlerocket OS 1.69.1 (metal-dev)! and the login prompt. Boot did not reach multi-user, because the test image had no net.toml.
    • With only the stock Microsoft keys, the firmware refuses it: BdsDxe: failed to load Boot0002 … Access Denied -- rejected probably by Secure Boot.
    • With the kernel's signature stripped (pesign: "No signatures found."), grub refuses it and never prints Linux version:
      error: ../../grub-core/kern/efi/sb.c:182:bad shim signature.
      rebooting in 30 seconds...
      
    • OVMF installs EFI_MEMORY_ATTRIBUTE_PROTOCOL, and every kit kernel sets NX_COMPAT, so patch 1092's NX path is likely exercised. This is inferred; grub doesn't log it.
  • Pending tests:

    • vmware-dev boot: The OVA was built and checked as above.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

Release .23 was never published separately. Its patches (1092-1095) ship
in .24.

Signed-off-by: Piyush Jena <jepiyush@amazon.com>
"grub,6" denotes a build that includes fixes for the following CVEs:

- CVE-2025-54770
- CVE-2025-54771
- CVE-2025-61661
- CVE-2025-61662
- CVE-2025-61663
- CVE-2025-61664

Signed-off-by: Piyush Jena <jepiyush@amazon.com>
@piyush-jena piyush-jena changed the title Grub update/kernel kit Grub update Nov 24, 2026
@piyush-jena piyush-jena changed the title Grub update grub update Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant