diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index de17c88b..fb446631 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -1,30 +1,46 @@ Confirm the following are included in your repo, checking each box: - - [ ] completed README.md file with the necessary information - - [ ] shim.efi to be signed - - [ ] public portion of your certificate(s) embedded in shim (the file passed to VENDOR_CERT_FILE) - - [ ] binaries, for which hashes are added to vendor_db ( if you use vendor_db and have hashes allow-listed ) - - [ ] any extra patches to shim via your own git tree or as files - - [ ] any extra patches to grub via your own git tree or as files - - [ ] build logs - - [ ] a Dockerfile to reproduce the build of the provided shim EFI binaries + - [x] completed README.md file with the necessary information + https://github.com/endlessm/shim-review/blob/endless-shim-x64-20240822/README.md + - [x] shim.efi to be signed + https://github.com/endlessm/shim-review/blob/endless-shim-x64-20240822/shimx64.efi + - [x] public portion of your certificate(s) embedded in shim (the file passed to VENDOR_CERT_FILE) + https://github.com/endlessm/shim-review/blob/endless-shim-x64-20240822/endless-uefi-ca.der + - [x] binaries, for which hashes are added to vendor_db ( if you use vendor_db and have hashes allow-listed ) + We do not use the vendor_db functionality. + - [x] any extra patches to shim via your own git tree or as files + https://github.com/endlessm/shim/tree/endless/15.8-1_deb12u1endless1/debian/patches + - [x] any extra patches to grub via your own git tree or as files + The full set of patches relative to 2.06 can be viewed at + https://github.com/endlessm/grub/compare/grub-2.06...Release_6.0.2 The + commits with `[DEB]` prefix come from Debian's `2.06-13+deb12u1` release. + All other commits are Endless specific. + - [x] build logs + https://github.com/endlessm/shim-review/blob/endless-shim-x64-20240822/buildlog.txt + - [x] a Dockerfile to reproduce the build of the provided shim EFI binaries + https://github.com/endlessm/shim-review/blob/endless-shim-x64-20240822/Dockerfile ******************************************************************************* ### What is the link to your tag in a repo cloned from rhboot/shim-review? ******************************************************************************* -`https://github.com/user/shim-review/tree/myorg-shim-arch-YYYYMMDD` +https://github.com/endlessm/shim-review/releases/tag/endless-shim-x64-20240822 ******************************************************************************* ### What is the SHA256 hash of your final SHIM binary? ******************************************************************************* -[your text here] +`7859e02e1fc6dff8e2b221dfcbfaffcb6d1e95e2acb65403e5db7c849f9221cd` ******************************************************************************* ### What is the link to your previous shim review request (if any, otherwise N/A)? ******************************************************************************* -[your text here] +https://github.com/rhboot/shim-review/issues/176 ******************************************************************************* ### If no security contacts have changed since verification, what is the link to your request, where they've been verified (if any, otherwise N/A)? ******************************************************************************* -[your text here] +The security contacts have not changed, however I can't find any indication of +verification in any previous reviews. Those are: + +https://github.com/rhboot/shim-review/issues/176 +https://github.com/rhboot/shim-review/issues/105 +https://github.com/rhboot/shim-review/issues/61 diff --git a/README.md b/README.md index 14e3e34b..6d8a24b9 100644 --- a/README.md +++ b/README.md @@ -22,22 +22,31 @@ Here's the template: ******************************************************************************* ### What organization or people are asking to have this signed? ******************************************************************************* -[your text here] + +Endless OS Foundation LLC +https://endlessos.org/ ******************************************************************************* ### What product or service is this for? ******************************************************************************* -[your text here] + +Endless OS. ******************************************************************************* ### What's the justification that this really does need to be signed for the whole world to be able to boot it? ******************************************************************************* -[your text here] + +Endless OS is a Linux distribution available for anyone to download on +https://endlessos.com/download/ and also shipped with computers sold directly +by us and by our OEM partners like Asus and Acer. ******************************************************************************* ### Why are you unable to reuse shim from another distro that is already signed? ******************************************************************************* -[your text here] + +We have a small amount of downstream patches to grub and linux. Since we can't +reuse those from another distro, we need our own shim that includes our own +vendor certificate. ******************************************************************************* ### Who is the primary contact for security updates, etc.? @@ -46,26 +55,20 @@ The security contacts need to be verified before the shim can be accepted. For s An authorized reviewer will initiate contact verification by sending each security contact a PGP-encrypted email containing random words. You will be asked to post the contents of these mails in your `shim-review` issue to prove ownership of the email addresses and PGP keys. ******************************************************************************* -- Name: -- Position: -- Email address: -- PGP key fingerprint: -(Key should be signed by the other security contacts, pushed to a keyserver -like keyserver.ubuntu.com, and preferably have signatures that are reasonably -well known in the Linux community.) +- Name: Robert McQueen +- Position: CEO +- Email address: ramcq@endlessos.org +- PGP key fingerprint: `F864269C9010B282EE51BD607F94998DE06F63B5` ******************************************************************************* ### Who is the secondary contact for security updates, etc.? ******************************************************************************* -- Name: -- Position: -- Email address: -- PGP key fingerprint: -(Key should be signed by the other security contacts, pushed to a keyserver -like keyserver.ubuntu.com, and preferably have signatures that are reasonably -well known in the Linux community.) +- Name: Will Thompson +- Position: Director of OS +- Email address: wjt@endlessos.org +- PGP key fingerprint: `1E68E58CF255888301645B563422DC0D7AD482A7` ******************************************************************************* ### Were these binaries created from the 15.8 shim release tar? @@ -86,7 +89,8 @@ Make sure that you've verified that your build process uses that file as a sourc A short guide on verifying public keys and signatures should be available in the [docs](./docs/) directory. ******************************************************************************* -[your text here] + +Yes, the shim binary was created from the shim-15.8.tar.bz2 tarball. ******************************************************************************* ### URL for a repo that contains the exact code which was built to result in your binary: @@ -94,26 +98,53 @@ Hint: If you attach all the patches and modifications that are being used to you You can also point to your custom git servers, where the code is hosted. ******************************************************************************* -[your url here] + +https://github.com/endlessm/shim/, branch `endlessm/master`, tag +`endless/15.8-1_deb12u1endless`. This is used to create a Debian source package +with the shim tarball generated from the `pristine-tar` branch. ******************************************************************************* ### What patches are being applied and why: Mention all the external patches and build process modifications, which are used during your building process, that make your shim binary be the exact one that you posted as part of this application. ******************************************************************************* -[your text here] + +We have applied 4 patches: + +* [0001-sbat-Add-grub.peimage-2-to-latest-CVE-2024-2312.patch](https://github.com/endlessm/shim/blob/endless/15.8-1_deb12u1endless1/debian/patches/0001-sbat-Add-grub.peimage-2-to-latest-CVE-2024-2312.patch) +* [0002-sbat-Also-bump-latest-for-grub-4-and-to-todays-date.patch](https://github.com/endlessm/shim/blob/endless/15.8-1_deb12u1endless1/debian/patches/0002-sbat-Also-bump-latest-for-grub-4-and-to-todays-date.patch) + +These are backports from upstream added by Debian to provide newer SBAT +policies in shim. + +* [0003-Revert-fallback-work-around-the-issue-of-boot-option.patch](https://github.com/endlessm/shim/blob/endless/15.8-1_deb12u1endless1/debian/patches/0003-Revert-fallback-work-around-the-issue-of-boot-option.patch) +* [0004-fallback-Clean-up-duplicate-boot-entries.patch](https://github.com/endlessm/shim/blob/endless/15.8-1_deb12u1endless1/debian/patches/0004-fallback-Clean-up-duplicate-boot-entries.patch) + +These patches are applied to the fallback program. They have fallback treat +boot entries with the same label as duplicates, and remove any entries that are +a duplicate of the entry we are about to create from the CSV file in the +fallback path. This is necessary for Endless OS because it's only installed by +writing an image directly to the disk. Since the partition IDs in the image are +fixed, they're randomized during the first boot, which invalidates the boot +entry just created by fallback. On the next boot, fallback will create a new +boot entry with the new ESP partition ID. While some firmware will delete boot +entries that refer to non-existent partition IDs, some will not and users will +be left with duplicate Endless OS boot entries. ******************************************************************************* ### Do you have the NX bit set in your shim? If so, is your entire boot stack NX-compatible and what testing have you done to ensure such compatibility? See https://techcommunity.microsoft.com/t5/hardware-dev-center/nx-exception-for-shim-community/ba-p/3976522 for more details on the signing of shim without NX bit. ******************************************************************************* -[your text here] + +No. Our grub is not NX-compatible, so we have followed the upstream default of +having the NX bit unset for shim. ******************************************************************************* ### What exact implementation of Secure Boot in GRUB2 do you have? (Either Upstream GRUB2 shim_lock verifier or Downstream RHEL/Fedora/Debian/Canonical-like implementation) Skip this, if you're not using GRUB2. ******************************************************************************* -[your text here] + +Downstream implementation from Debian. ******************************************************************************* ### Do you have fixes for all the following GRUB2 CVEs applied? @@ -158,21 +189,33 @@ Skip this, if you're not using GRUB2. * CVE-2023-4693 * CVE-2023-4692 ******************************************************************************* -[your text here] + +Our GRUB2 is based on Debian's GRUB2 `2.06-13+deb12u1` release, where all CVEs +from the list above were fixed. ******************************************************************************* ### If shim is loading GRUB2 bootloader, and if these fixes have been applied, is the upstream global SBAT generation in your GRUB2 binary set to 4? Skip this, if you're not using GRUB2, otherwise do you have an entry in your GRUB2 binary similar to: `grub,4,Free Software Foundation,grub,GRUB_UPSTREAM_VERSION,https://www.gnu.org/software/grub/`? ******************************************************************************* -[your text here] + +Yes. The full GRUB2 SBAT section is: + +``` +sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md +grub,4,Free Software Foundation,grub,2.06,https://www.gnu.org/software/grub/ +grub.debian,4,Debian,grub2,2.06-13+deb12u1,https://tracker.debian.org/pkg/grub2 +grub.endless,4,Endless OS Foundation LLC,grub2,2.06+dev154.22484f8-7bem1,https://github.com/endlessm/grub +``` ******************************************************************************* ### Were old shims hashes provided to Microsoft for verification and to be added to future DBX updates? ### Does your new chain of trust disallow booting old GRUB2 builds affected by the CVEs? If you had no previous signed shim, say so here. Otherwise a simple _yes_ will do. ******************************************************************************* -[your text here] +- Yes, old shim hashes were provided to Microsoft. +- Yes, the new chain of trust disallows booting all previous GRUB2 and kernel + binaries signed with our old key. ******************************************************************************* ### If your boot chain of trust includes a Linux kernel: @@ -182,24 +225,38 @@ If you had no previous signed shim, say so here. Otherwise a simple _yes_ will d Hint: upstream kernels should have all these applied, but if you ship your own heavily-modified older kernel version, that is being maintained separately from upstream, this may not be the case. If you are shipping an older kernel, double-check your sources; maybe you do not have all the patches, but ship a configuration, that does not expose the issue(s). ******************************************************************************* -[your text here] + +Yes, our most recent kernel is based on an upstrem release that already +includes these commits: + +https://github.com/endlessm/linux/commit/1957a85b0032 +https://github.com/endlessm/linux/commit/75b0cea7bf30 +https://github.com/endlessm/linux/commit/eadb2f47a3ce ******************************************************************************* ### Do you build your signed kernel with additional local patches? What do they do? ******************************************************************************* -[your text here] + +Our kernel is based on Ubuntu's 6.5.0-10.10 release. For both Endless and +Ubuntu, the downstream patches are primarily security fixes and upstream +backports for hardware issues reported by partners and users. + +Endless also includes a small custom LSM (`endlesspayg`), but it is only used +on systems that do not use shim for booting. ******************************************************************************* ### Do you use an ephemeral key for signing kernel modules? ### If not, please describe how you ensure that one kernel build does not load modules built for another kernel. ******************************************************************************* -[your text here] + +Yes. ******************************************************************************* ### If you use vendor_db functionality of providing multiple certificates and/or hashes please briefly describe your certificate setup. ### If there are allow-listed hashes please provide exact binaries for which hashes are created via file sharing service, available in public with anonymous access for verification. ******************************************************************************* -[your text here] + +We do not use the vendor_db functionality. ******************************************************************************* ### If you are re-using the CA certificate from your last shim binary, you will need to add the hashes of the previous GRUB2 binaries exposed to the CVEs mentioned earlier to vendor_dbx in shim. Please describe your strategy. @@ -207,7 +264,10 @@ This ensures that your new shim+GRUB2 can no longer chainload those older GRUB2 If this is your first application or you're using a new CA certificate, please say so here. ******************************************************************************* -[your text here] + +Rather than revoke individual binary hashes, the signing certificate we used to +sign GRUB2 and the linux kernel image has been replaced. That and all previous +signing certificates were added to the new shim's vendor_dbx. ******************************************************************************* ### Is the Dockerfile in your repository the recipe for reproducing the building of your shim binary? @@ -217,13 +277,22 @@ Hint: Prefer using *frozen* packages for your toolchain, since an update to GCC, If your shim binaries can't be reproduced using the provided Dockerfile, please explain why that's the case, what the differences would be and what build environment (OS and toolchain) is being used to reproduce this build? In this case please write a detailed guide, how to setup this build environment from scratch. ******************************************************************************* -[your text here] + +Yes, the `Dockerfile` provided here can fully reproduce the shim binary by +running `docker build .`. The build environment is frozen using an image +created using `Dockerfile-buildroot` at the time shim was built. It has been +published to the GitHub container registry. For convenience, the `build.sh` +script will run the docker build and extract `shimx64.efi` for analysis. ******************************************************************************* ### Which files in this repo are the logs for your build? This should include logs for creating the buildroots, applying patches, doing the build, creating the archives, etc. ******************************************************************************* -[your text here] + +[buildlog.txt](buildlog.txt) contains the log for the exact build of shim +provided here using Open Build Service (OBS). It shows all steps of creating +the buildroot and running the Debian binary package build. The package build +contains all the steps beyond creating the buildroot. ******************************************************************************* ### What changes were made in the distro's secure boot chain since your SHIM was last signed? @@ -231,24 +300,41 @@ For example, signing new kernel's variants, UKI, systemd-boot, new certs, new CA Skip this, if this is your first application for having shim signed. ******************************************************************************* -[your text here] + +Since our last signature in 2021 there have been no new assets in our boot +chain. + +Our CA certificate was nearing it's 10 year expiration, so we reissued it in +2022 with a 30 year expiration period. The Subject and Public Key are retained +so that existing signatures remain valid. The certificate is otherwise +identical except that the deprecated Netscape Certificate Type field has been +removed. New signing certificates were also issued from the CA. ******************************************************************************* ### What is the SHA256 hash of your final shim binary? ******************************************************************************* -[your text here] + +`7859e02e1fc6dff8e2b221dfcbfaffcb6d1e95e2acb65403e5db7c849f9221cd` ******************************************************************************* ### How do you manage and protect the keys used in your shim? Describe the security strategy that is used for key protection. This can range from using hardware tokens like HSMs or Smartcards, air-gapped vaults, physical safes to other good practices. ******************************************************************************* -[your text here] + +We have generated our own secure boot CA private key which is stored offline +with physical security protection and only accessed to provision new signing +keys. The CA public key is the one embedded in the shim binary. The signing +keys which are used in our build servers to sign the bootloader and kernel are +stored in J3A081 80K smartcard HW encryption devices. This is based on the +procedure described +[here](https://fedoraproject.org/wiki/User:Pjones/SecureBootSmartCardDeployment). ******************************************************************************* ### Do you use EV certificates as embedded certificates in the shim? A _yes_ or _no_ will do. There's no penalty for the latter. ******************************************************************************* -[your text here] + +No. ******************************************************************************* ### Do you add a vendor-specific SBAT entry to the SBAT section in each binary that supports SBAT metadata ( GRUB2, fwupd, fwupdate, systemd-boot, systemd-stub, shim + all child shim binaries )? @@ -261,7 +347,24 @@ If you are using a downstream implementation of GRUB2 (e.g. from Fedora or Debia Hint: run `objcopy --only-section .sbat -O binary YOUR_EFI_BINARY /dev/stdout` to get these entries. Paste them here. Preferably surround each listing with three backticks (\`\`\`), so they render well. ******************************************************************************* -[your text here] + +Currently only GRUB2 is booted directly by shim. All of these have SBAT +entries. + +Shim (`shimx64.efi`), MokManager (`mmx64.efi`), Fallback (`fbx64.efi`): +``` +sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md +shim,4,UEFI shim,shim,1,https://github.com/rhboot/shim +shim.endless,1,Endless OS Foundation LLC,shim,15.8,https://github.com/endlessm/shim +``` + +GRUB2 (`grubx64.efi`): +``` +sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md +grub,4,Free Software Foundation,grub,2.06,https://www.gnu.org/software/grub/ +grub.debian,4,Debian,grub2,2.06-13+deb12u1,https://tracker.debian.org/pkg/grub2 +grub.endless,4,Endless OS Foundation LLC,grub2,2.06+dev154.22484f8-7bem1,https://github.com/endlessm/grub +``` ******************************************************************************* ### If shim is loading GRUB2 bootloader, which modules are built into your signed GRUB2 image? @@ -269,45 +372,140 @@ Skip this, if you're not using GRUB2. Hint: this is about those modules that are in the binary itself, not the `.mod` files in your filesystem. ******************************************************************************* -[your text here] + +To simplify distribution, all modules are built into `grubx64.efi`: + +``` +all_video +blscfg +boot +btrfs +cat +chain +configfile +disk +echo +efifwsetup +efinet +ext2 +exfat +fat +file +font +gcry_sha512 +gcry_rsa +gettext +gfxmenu +gfxterm +gfxterm_background +gzio +halt +hfsplus +iso9660 +jpeg +keystatus +loadenv +loopback +linux +linuxefi +ls +lsefi +lsefimmap +lsefisystab +lssal +memdisk +minicmd +normal +ntfs +part_apple +part_msdos +part_gpt +password_pbkdf2 +png +pgp +probe +read +reboot +regexp +search +search_fs_uuid +search_fs_file +search_label +search_fs_type +sleep +squash4 +test +time +true +video +``` ******************************************************************************* ### If you are using systemd-boot on arm64 or riscv, is the fix for [unverified Devicetree Blob loading](https://github.com/systemd/systemd/security/advisories/GHSA-6m6p-rjcq-334c) included? ******************************************************************************* -[your text here] + +We are not using systemd-boot on those platforms. ******************************************************************************* ### What is the origin and full version number of your bootloader (GRUB2 or systemd-boot or other)? ******************************************************************************* -[your text here] + +Our GRUB2 full version is `2.06+dev154.22484f8-7bem1` and comes from the +https://github.com/endlessm/grub repo. This uses branches `master` (for code) +and `debian-master` (for packaging). + +This version is based on Debian's `2.06-13+deb12u1` release, which is based on +the `2.06` upstream release. + +The full set of patches relative to 2.06 can be viewed at +https://github.com/endlessm/grub/compare/grub-2.06...Release_6.0.2 The commits +with `[DEB]` prefix come from Debian's `2.06-13+deb12u1` release. All other +commits are Endless specific. ******************************************************************************* ### If your shim launches any other components apart from your bootloader, please provide further details on what is launched. Hint: The most common case here will be a firmware updater like fwupd. ******************************************************************************* -[your text here] + +Currently our shim does not launch any other components. ******************************************************************************* ### If your GRUB2 or systemd-boot launches any other binaries that are not the Linux kernel in SecureBoot mode, please provide further details on what is launched and how it enforces Secureboot lockdown. Skip this, if you're not using GRUB2 or systemd-boot. ******************************************************************************* -[your text here] + +Currently our shim does not launch any other components. ******************************************************************************* ### How do the launched components prevent execution of unauthenticated code? Summarize in one or two sentences, how your secure bootchain works on higher level. ******************************************************************************* -[your text here] + +Only GRUB2's `linuxefi` loader is run. This uses the shim lock protocol to +verify the kernel in secure boot. ******************************************************************************* ### Does your shim load any loaders that support loading unsigned kernels (e.g. certain GRUB2 configurations)? ******************************************************************************* -[your text here] + +No, the GRUB version we ship does not allow loading unsigned kernels under +secure boot. The `linux` loader in our grub EFI binary always hands-off loading +to the `linuxefi` module, which verifies the kernel via the shim protocol under +secure boot. ******************************************************************************* ### What kernel are you using? Which patches and configuration does it include to enforce Secure Boot? ******************************************************************************* -[your text here] + +We are currently based on Linux 6.5 using Ubuntu's `6.5.0-10.10` release. It is +configured with `CONFIG_INTEGRITY`, `CONFIG_INTEGRITY_PLATFORM_KEYRING` and +`CONFIG_INTEGRITY_MACHINE_KEYRING` so that the integrity ISA subsystem is +enabled and loads secure boot and MOK certificates to verify external kernel +modules. + +Additionally, it contains RedHat's lockdown patches via Ubuntu with +`CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT` enabled so that only signed kernel +modules can be loaded when secure boot is enabled. ******************************************************************************* ### What contributions have you made to help us review the applications of other applicants? @@ -317,9 +515,24 @@ A reasonable timeframe of waiting for a review can reach 2-3 months. Helping us For newcomers, the applications labeled as [*easy to review*](https://github.com/rhboot/shim-review/issues?q=is%3Aopen+is%3Aissue+label%3A%22easy+to+review%22) are recommended to start the contribution process. ******************************************************************************* -[your text here] + +I (@dbnicholson) was not aware of this effort but will try to help some +reviews. ******************************************************************************* ### Add any additional information you think we may need to validate this shim signing application. ******************************************************************************* -[your text here] + +Shim is built with `SBAT_AUTOMATIC_DATE=2024010900` with the following +`.sbatlevel` policy: + +``` +7sbat,1,2024010900 +shim,4 +grub,3 +grub.debian,4 +sbat,1,2024040900 +shim,4 +grub,4 +grub.peimage,2 +```