Skip to content

Latest commit

 

History

History
386 lines (300 loc) · 25.1 KB

README.md

File metadata and controls

386 lines (300 loc) · 25.1 KB

This repo is for review of requests for signing shim. To create a request for review:

  • clone this repo (preferably fork it)
  • edit the template below
  • add the shim.efi to be signed
  • add build logs
  • add any additional binaries/certificates/SHA256 hashes that may be needed
  • commit all of that
  • tag it with a tag of the form "myorg-shim-arch-YYYYMMDD"
  • push it to GitHub
  • file an issue at https://github.com/rhboot/shim-review/issues with a link to your tag
  • approval is ready when the "accepted" label is added to your issue

Note that we really only have experience with using GRUB2 or systemd-boot on Linux, so asking us to endorse anything else for signing is going to require some convincing on your part.

Check the docs directory in this repo for guidance on submission and getting your shim signed.

Here's the template:


What organization or people are asking to have this signed?


CIQ Inc. ( https://ciq.com )


What product or service is this for?


CIQ is offering a product named "CIQ bridge". CIQ Bridge allows for a secure transition from from CentOS 7 to Rocky 8. During the the 3 year transistion period. CIQ will offer Kernel vulnerability patching along with userland and scecure boot chain components.


What's the justification that this really does need to be signed for the whole world to be able to boot it?


Our customers use a variety of hardware platforms. Many of them have policies in place, or are contractually obligated in some way to use the default EFI firmware with no customized secureboot/MOK key injection. At the same time, many customers require security backports for their workload.


Why are you unable to reuse shim from another distro that is already signed?


We need these customized kernels to boot properly on stock hardware. This is not possible with the default CentOS Linux shim binary.


Who is the primary contact for security updates, etc.?

The security contacts need to be verified before the shim can be accepted. For subsequent requests, contact verification is only necessary if the security contacts or their PGP keys have changed since the last successful verification.

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.


(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.)


Who is the secondary contact for security updates, etc.?


(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.)


Were these binaries created from the 15.8 shim release tar?

Please create your shim binaries starting with the 15.8 shim release tar file: https://github.com/rhboot/shim/releases/download/15.8/shim-15.8.tar.bz2

This matches https://github.com/rhboot/shim/releases/tag/15.8 and contains the appropriate gnu-efi source.


Yes, along with a patch needed for compilation on CentOS 7


URL for a repo that contains the exact code which was built to get this binary:


CIQ shim-unsigned-x64 RPM repository: https://github.com/ctrliq/shim-unsigned-x64/tree/ciq7

This code is a combination of: https://github.com/rhboot/shim/releases/download/15.8/shim-15.8.tar.bz2 and an RPM spec file derived from the RHEL one.

Additionally, I have a "frozen" repository copy of the Mock buildroot and build dependencies (gcc, openssl, et al.) here:

https://rl-secure-boot.ewr1.vultrobjects.com/repos/c7/shim_review_deps/ (this gets used by Mock as a source of RPM dependencies)

Using this repository (consisting of public CentOS Linux 7 packages) ensures a reproducible binary when building the shim-unsigned-x64 with mock (or Docker/Podman) and rpmbuild.


What patches are being applied and why:


CentOS 7 has a version of dos2unix that doesn't support -f, the patch removes the use of -f in the shim build


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.


No, we do not have the NX bit set on our shim


If shim is loading GRUB2 bootloader what exact implementation of Secureboot in GRUB2 do you have? (Either Upstream GRUB2 shim_lock verifier or Downstream RHEL/Fedora/Debian/Canonical-like implementation)


We intend to use the default CentOS 7 GRUB2, as our projects have no need for bootloader modifications. Our engineers will be patching this grub2 version for security issues as they are discovered.


If shim is loading GRUB2 bootloader and your previously released shim booted a version of GRUB2 affected by any of the CVEs in the July 2020, the March 2021, the June 7th 2022, the November 15th 2022, or 3rd of October 2023 GRUB2 CVE list, have fixes for all these CVEs been applied?


This is our first submission for CentOS/EL7. I can confirm that our grub2 builds will not be affected by any of those.

All but the NTFS ones have been fixed in our upstream:

https://git.centos.org/rpms/grub2/blob/351970dbd07603ccb345cc9d743c9cd90b9e85e8/f/SPECS/grub2.spec#_471

The NTFS fixes are not relevant to us, as we don't build or support those modules in the signed bootloader.


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?

The entry should look similar to: grub,4,Free Software Foundation,grub,GRUB_UPSTREAM_VERSION,https://www.gnu.org/software/grub/


Our grub2 originates from our upstream (Centos / RHEL 7). Centos has not updated grub and is still on generation level 3, due to being unaffected by the NTFS issue.

sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md
grub,3,Free Software Foundation,grub,2.02,https://www.gnu.org/software/grub/
grub.rhel7,2,Red Hat Enterprise Linux 7,grub2,1:2.02-0.87.el7.14,mail:[email protected]
grub.ciq_centos7,1,Centos Linux 7 (CIQ build),grub2,1:2.02-0.87.el7.14,mailto:[email protected]

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?


This is our first EL7 submission, we do not have old GRUB2 builds affected by CVEs.


If your boot chain of trust includes a Linux kernel:


Yes, all of these patches are already in the Centos 7 kernels.


Do you build your signed kernel with additional local patches? What do they do?


Fixes and enhancements (especially security updates) to continue long-term support of a previous Centos Linux release. For example, further backports to the Centos/RHEL 7.9 kernel (kernel-3.10.0-1160) to keep it updated for customers.


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.


A temporary ephemral key is used to sign kernel modules


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.


We aren't using vendor_db functionality at this time.


If you are re-using a previously used (CA) certificate, you will need to add the hashes of the previous GRUB2 binaries exposed to the CVEs to vendor_dbx in shim in order to prevent GRUB2 from being able to chainload those older GRUB2 binaries. If you are changing to a new (CA) certificate, this does not apply.

Please describe your strategy.


We are using a previously used (currently active) CA from our past Rocky Linux 8-based submission.

There have been no built GRUB2 binaries exposed to the listed CVEs that we have released, as our previous submission was relatively recent.


What OS and toolchain must we use to reproduce this build? Include where to find it, etc. We're going to try to reproduce your build as closely as possible to verify that it's really a build of the source tree you tell us it is, so these need to be fairly thorough. At the very least include the specific versions of gcc, binutils, and gnu-efi which were used, and where to find those binaries.

If the shim binaries can't be reproduced using the provided Dockerfile, please explain why that's the case and what the differences would be.


This build is all Centos 7.9 dependencies, using rpmbuild.

To ensure reproducibility, we have "frozen" all the dependent Centos 7 packages needed and put them in their own repository. It can be found in the builder's Dockerfile.

Using a tagged container base plus this repository should ensure binaries are 100% reproducible.

Current reproducible shim build location: https://github.com/ctrliq/ciq-shim-build/tree/c7


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.


shim_rpmbuild.log contains a log of the docker build run. This includes dependency install, compilation, hash comparison, etc.


What changes were made in the distro's secure boot chain since your SHIM was last signed?

For example, signing new kernel's variants, UKI, systemd-boot, new certs, new CA, etc..


Our shim has never been signed for this distro derivative, our previous submission uses a chain derived from Rocky 8.


What is the SHA256 hash of your final SHIM binary?


  • SHA256 (shimx64.efi) = 088610925c2491017f6488f6235c6daec4e7f567dfb6c4e8c55d64d6acaafbae
  • SHA256 (shimai32.efi) = 14822c87e48f9ca65df08a4595ffa8cc6a7564197826521318488178fdf16272

How do you manage and protect the keys used in your SHIM?


We use a managed PKI solution that meets all industry standards and requirements for issuing, protecting, backing up and securing code signing certs.

There is a Private Root CA and a Private Issuing CA. The Private Issuing CA was used for issuing of the private code signing certs that are found in the SHIM.

Those issued certs are then stored on a physical HSM. That HSM is installed within a FIPS environment. All access to that environment is strictly controlled with physical and logical controls in place, with no outside access permitted. The servers are in a locked environment and within a secure data center with proper physical access controls in place at that location for security purposes.


Do you use EV certificates as embedded certificates in the SHIM?


No, only the CIQ secureboot CA (PKI) is embedded in our Shim


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, UKI(s), shim + all child shim binaries )?

Please provide exact SBAT entries for all shim binaries as well as all SBAT binaries that shim will directly boot.

Where your code is only slightly modified from an upstream vendor's, please also preserve their SBAT entries to simplify revocation.

If you are using a downstream implementation of GRUB2 or systemd-boot (e.g. from Fedora or Debian), please preserve the SBAT entry from those distributions and only append your own. More information on how SBAT works can be found here.


objcopy --only-section .sbat -O binary ./boot/efi/EFI/centos/grubx64.efi /dev/stdout
sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md
grub,3,Free Software Foundation,grub,2.02,https://www.gnu.org/software/grub/
grub.rhel7,2,Red Hat Enterprise Linux 7,grub2,1:2.02-0.87.el7.14,mail:[email protected]
grub.ciq_centos7,1,Centos Linux 7 (CIQ build),grub2,1:2.02-0.87.el7.14,mailto:[email protected]

objcopy --only-section .sbat -O binary ./boot/efi/EFI/centos/grubia32.efi /dev/stdout
sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md
grub,3,Free Software Foundation,grub,2.02,https://www.gnu.org/software/grub/
grub.rhel7,2,Red Hat Enterprise Linux 7,grub2,1:2.02-0.87.el7.14,mail:[email protected]
grub.ciq_centos7,1,Centos Linux 7 (CIQ build),grub2,1:2.02-0.87.el7.14,mailto:[email protected]

objcopy --only-section .sbat -O binary ./boot/efi/EFI/centos/fwupx64.efi /dev/stdout
sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md
fwupdate,1,UEFI firmware update tool,fwupdate,12,https://github.com/rhboot/fwupdate
fwupdate.rhel7,1,Red Hat Enterprise Linux 7,fwupdate,12-6.el7_6.1,mail:[email protected]
fwupdate.ciq_centos7,1,Centos Linux 7 (CIQ build),fwupdate,12-7.el7,mailto:[email protected]

objcopy --only-section .sbat -O binary ./boot/efi/EFI/centos/fwupia32.efi /dev/stdout
sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md
fwupdate,1,UEFI firmware update tool,fwupdate,12,https://github.com/rhboot/fwupdate
fwupdate.rhel7,1,Red Hat Enterprise Linux 7,fwupdate,12-6.el7_6.1,mail:[email protected]
fwupdate.ciq_centos7,1,Centos Linux 7 (CIQ build),fwupdate,12-7.el7,mailto:[email protected]

objcopy --only-section .sbat -O binary  shimx64.efi /dev/stdout 
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.ciq,1,Ctrl IQ Inc,shim,15.8,mail:[email protected]

objcopy --only-section .sbat -O binary  shimia32.efi /dev/stdout
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.ciq,1,Ctrl IQ Inc,shim,15.8,mail:[email protected]

If shim is loading GRUB2 bootloader, which modules are built into your signed GRUB2 image?


Centos 7 / Grub 2.02-0 :

all_video boot btrfs cat chain configfile echo
efifwsetup efinet ext2 fat font gfxmenu gfxterm
gzio halt hfsplus iso9660 jpeg loadenv loopback
lvm mdraid09 mdraid1x minicmd normal part_apple
part_msdos part_gpt password_pbkdf2 png reboot
regexp search search_fs_uuid search_fs_file
search_label serial sleep syslinuxcfg test tftp
video xfs

If you are using systemd-boot on arm64 or riscv, is the fix for unverified Devicetree Blob loading included?


N/a


What is the origin and full version number of your bootloader (GRUB2 or systemd-boot or other)?


We currently use the same version as Centos - 2.02-0.87.el7.14 . Subject to minor incremental patches as security issues crop up.


If your SHIM launches any other components, please provide further details on what is launched.


N/a, at one point we considered using certwrapper, but decided against it considering the CentOS 7 CA is expiring and the upstream components are receiving no new updates.


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.


No, Linux kernel launches are all we are interested in.


How do the launched components prevent execution of unauthenticated code?


In the case of the kernel, both the Centos variant and the upstream ("new") variants prevent this by default, and we do not want to change that.

In the case of Grub + fwupdate, we are derived from Centos/RHEL versions with minimal ongoing security fixes. They also do not execute unauthenticated code by default.


Does your SHIM load any loaders that support loading unsigned kernels (e.g. GRUB2)?


Grub2 will only load unsigned code if the secureboot feature is turned off. Otherwise booting signed code is always enforced, same as upstream CentOS/RHEL.


What kernel are you using? Which patches and configuration does it include to enforce Secure Boot?


We are using the centos upstream variant 3.10 with minor patches (on top of the heavy backports and modifications from Red Hat and others).

I understand that these all enforce secure boot "out of the box".


What contributions have you made to help us review the applications of other applicants?

The reviewing process is meant to be a peer-review effort and the best way to have your application reviewed faster is to help with reviewing others. We are in most cases volunteers working on this venue in our free time, rather than being employed and paid to review the applications during our business hours.

A reasonable timeframe of waiting for a review can reach 2-3 months. Helping us is the best way to shorten this period. The more help we get, the faster and the smoother things will go.

For newcomers, the applications labeled as easy to review are recommended to start the contribution process.


Jason Rodriguez has contributed to the review process of other submissions, he should do a lot more to invest in the process.


Add any additional information you think we may need to validate this shim signing application.


N/a