forked from rhboot/shim-review
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Community review request for Endless.
- Loading branch information
Showing
9 changed files
with
1,968 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
To reproduce the build in the attached container defined by the attached | ||
Dockerfile run: | ||
|
||
``` | ||
sudo docker build . | ||
``` | ||
|
||
At the end of the process the SHA256 checksum of shimx64.efi that was just | ||
built will be printed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM debian:buster | ||
ADD --chown=root:root endless.origins /etc/dpkg/origins/endless | ||
RUN echo "deb-src http://deb.debian.org/debian buster main" > /etc/apt/sources.list.d/deb-src.list | ||
RUN apt-get update -y | ||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends build-essential devscripts git | ||
RUN apt-get build-dep -y shim | ||
RUN git clone https://github.com/endlessm/shim.git shim-15+dev16.b59aab6 | ||
WORKDIR /shim-15+dev16.b59aab6 | ||
RUN git config user.email "[email protected]" | ||
RUN git merge --allow-unrelated-histories -m "Import the packaging bits into master" origin/debian-master | ||
RUN echo "1.0" > debian/source/format | ||
RUN echo "--compression=gzip" > debian/source/options | ||
RUN dch -v 15+dev16.b59aab6-5 -D eos --force-distribution 'Automatic release from git (15+dev16.b59aab6-5)' | ||
RUN rm -rf .git | ||
RUN DEB_VENDOR=endless dpkg-buildpackage -us -uc | ||
WORKDIR / | ||
RUN dpkg-deb -x shim-efi-image_15+dev16.b59aab6-5_amd64.deb shim-efi-image | ||
RUN cp shim-efi-image/boot/efi/EFI/endless/shimx64.efi . | ||
RUN sha256sum shimx64.efi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,75 @@ | ||
Make sure you have provided the following information: | ||
|
||
- [ ] link to your code branch cloned from rhboot/shim-review in the form user/repo@tag | ||
- [ ] completed README.md file with the necessary information | ||
- [ ] shim.efi to be signed | ||
- [ ] public portion of your certificate embedded in shim (the file passed to VENDOR_CERT_FILE) | ||
- [ ] 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 | ||
- [X] link to your code branch cloned from rhboot/shim-review in the form user/repo@tag | ||
https://github.com/endlessm/shim-review/tree/endless-shim-x64-20190410 | ||
- [X] completed README.md file with the necessary information | ||
https://github.com/endlessm/shim-review/blob/endless-shim-x64-20190410/README.md | ||
- [X] shim.efi to be signed | ||
https://github.com/endlessm/shim-review/blob/endless-shim-x64-20190410/shimx64.efi | ||
- [X] public portion of your certificate embedded in shim (the file passed to VENDOR_CERT_FILE) | ||
https://github.com/endlessm/shim-review/blob/endless-shim-x64-20190410/endless-uefi-ca.der | ||
- [X] any extra patches to shim via your own git tree or as files | ||
The last 16 commits on https://github.com/endlessm/shim/commits/master. | ||
- [X] any extra patches to grub via your own git tree or as files | ||
The grub source code we use can be found on the master branch of | ||
https://github.com/endlessm/grub. We are based on tag grub-2.02 from | ||
upstream. | ||
- [X] build logs | ||
https://github.com/endlessm/shim-review/blob/endless-shim-x64-20190410/logs.txt | ||
|
||
|
||
###### What organization or people are asking to have this signed: | ||
`[your text here]` | ||
Endless Mobile, Inc. | ||
https://endlessos.com/ | ||
|
||
###### What product or service is this for: | ||
`[your text here]` | ||
Endless OS. | ||
|
||
###### What is the origin and full version number of your shim? | ||
`[your text here]` | ||
Our code is based on upstream tag `15` with a few changes to the fallback | ||
program. The packaging bits are based on the packaging from Debian Buster, | ||
`version 0.9+1474479173.6c180c6-1`. The full version of our package is | ||
`15+dev16.b56aab6-7bem1`. | ||
|
||
###### 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. | ||
|
||
###### How do you manage and protect the keys used in your SHIM? | ||
`[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 present in the shim binary. The signing keys | ||
which are used in our build servers to sign the bootloader and kernel are | ||
stored on J3A081 80K smartcard HW encryption devices. This is based on the | ||
procedure described at | ||
https://fedoraproject.org/wiki/User:Pjones/SecureBootSmartCardDeployment | ||
|
||
###### Do you use EV certificates as embedded certificates in the SHIM? | ||
`[your text here]` | ||
No. | ||
|
||
###### What is the origin and full version number of your bootloader (GRUB or other)? | ||
`[your text here]` | ||
We use GRUB as the bootloader, with the Secure Boot patchset from Red Hat / | ||
Fedora which adds integration between GRUB and shim. The grub source code we | ||
use can be found on the master branch of https://github.com/endlessm/grub. We | ||
are based on tag grub-2.02 from upstream. | ||
|
||
###### If your SHIM launches any other components, please provide further details on what is launched | ||
`[your text here]` | ||
Our shim does not load any other components. | ||
|
||
###### How do the launched components prevent execution of unauthenticated code? | ||
`[your text here]` | ||
N/A. | ||
|
||
###### Does your SHIM load any loaders that support loading unsigned kernels (e.g. GRUB)? | ||
`[your text here]` | ||
No, our grub does not allow loading unsigned kernels when secure boot is | ||
enabled. Our grub EFI binary only includes the `linuxefi` module, which | ||
verifies the kernel via shim, and does not include the `linux` module. | ||
|
||
###### What kernel are you using? Which patches does it includes to enforce Secure Boot? | ||
`[your text here]` | ||
Linux 5.0 with secure boot support. | ||
|
||
###### What changes were made since your SHIM was last signed? | ||
`[your text here]` | ||
Rebased on a newer upstream version. | ||
|
||
###### What is the hash of your final SHIM binary? | ||
`[your text here]` | ||
e592a7f77ed424c30c7afa4f79a66346b86ea2246bf1394d386fd180a9aa5f6b shimx64.efi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,60 +18,132 @@ Here's the template: | |
------------------------------------------------------------------------------- | ||
What organization or people are asking to have this signed: | ||
------------------------------------------------------------------------------- | ||
[your text here] | ||
Endless Mobile, Inc. | ||
https://endlessos.com/ | ||
|
||
------------------------------------------------------------------------------- | ||
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. | ||
|
||
------------------------------------------------------------------------------- | ||
Who is the primary contact for security updates, etc. | ||
------------------------------------------------------------------------------- | ||
- Name: | ||
- Position: | ||
- Email address: | ||
- PGP key, signed by the other security contacts, and preferably also with signatures that are reasonably well known in the linux community: | ||
- Name: Robert McQueen | ||
- Position: Chief of Engineering | ||
- Email address: [email protected] | ||
- PGP key, signed by the other security contacts, and preferably also with | ||
signatures that are reasonably well known in the linux community: | ||
`F864269C9010B282EE51BD607F94998DE06F63B5` | ||
|
||
------------------------------------------------------------------------------- | ||
Who is the secondary contact for security updates, etc. | ||
------------------------------------------------------------------------------- | ||
- Name: | ||
- Position: | ||
- Email address: | ||
- PGP key, signed by the other security contacts, and preferably also with signatures that are reasonably well known in the linux community: | ||
- Name: Will Thompson | ||
- Position: Senior Software Engineer | ||
- Email address: [email protected] | ||
- PGP key, signed by the other security contacts, and preferably also with | ||
signatures that are reasonably well known in the linux community: | ||
`1E68E58CF255888301645B563422DC0D7AD482A7` | ||
|
||
------------------------------------------------------------------------------- | ||
What upstream shim tag is this starting from: | ||
------------------------------------------------------------------------------- | ||
[our url here] | ||
Upstream tag `15`, commit hash `51413d1deb0df0debdf1d208723131ff0e36d3a3`. | ||
https://github.com/rhboot/shim/tree/15 | ||
|
||
------------------------------------------------------------------------------- | ||
URL for a repo that contains the exact code which was built to get this binary: | ||
------------------------------------------------------------------------------- | ||
[your url here] | ||
https://github.com/endlessm/shim/commits/master | ||
Branch `master`, commit hash `b59aab6e1e011e02bcc0cbbe53e050a010244797`. | ||
|
||
------------------------------------------------------------------------------- | ||
What patches are being applied and why: | ||
------------------------------------------------------------------------------- | ||
[your text here] | ||
There are no patches that change the behavior of the shim binary. | ||
|
||
There is one patch to remove the use of `git` in the build process because our | ||
build servers start from a distribuition tarball which does not contain the | ||
`.git` directory: `af37fc2 Makefile: Don't use git for cleaning`. | ||
|
||
All other patches only affect the fallback binary. | ||
|
||
- Two patches to make fallback silent by default so we get a flicker-free | ||
experience on the fallback path as well. | ||
`cc162f1 fallback: Only use VerbosePrint for debug messages` | ||
`025982a fallback: Be silent by default` | ||
|
||
- Four patches to make the process of debugging the fallback binary easier. | ||
`5cc4d65 fallback: Allow defining FALLBACK_VERBOSE at build time` | ||
`3ea2c3a fallback: Wait before chainloading as well in verbose mode` | ||
`3455285 fallback: Make verbose mode's wait time configurable` | ||
`bf2915d fallback: Print original BootOrder value in verbose mode` | ||
|
||
- One patch to make fallback check all boot variables instead of only the | ||
numbers listed in BootOrder when looking for duplicates, to address a problem | ||
where the firmware re-generates BootOrder every boot to only including its | ||
pre-determined boot entries, but still leaving user-created boot entries | ||
intact (only removing them from BootOrder). | ||
`d3a2489 fallback: Consider all Boot* vars when checking for duplicates` | ||
|
||
- One patch to always chain-load the newly created boot entry instead of | ||
rebooting the system to avoid a reboot loop on firmwares that re-generate | ||
BootOrder every boot to only including their pre-determined boot entries. | ||
`e3513c8 [Endless] fallback: Always try to chain-load the first entry` | ||
|
||
- One small code improvement that removes an un-necessary call to StrLen. | ||
`e26c5b1 fallback: Store label size instead of calculating on every use` | ||
|
||
- A set of changes to 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 randomize the partition ids during the first boot, since | ||
the partition layout is created by the server at image build time and the | ||
image in simply dd'ed to the disk during installation. We explicitly do not | ||
support have two Endless OS installations side-by-side on the same machine, | ||
even on different disks, so the added restriction of not allowing to boot | ||
entries with the same name is not a problem for us. | ||
`3e70ad8 [Endless] Partially revert "fallback: work around the issue of boot option creation with AMI BIOS"` | ||
`f7c0d9b [Endless] fallback: Clean-up duplicate boot entries` | ||
`a81b858 [Endless] fallback: Use a dynamic buffer when list var names` | ||
`cb0b03b [Endless] fallback: Print info on GetNextVariableName errors` | ||
`f6267f1 [Endless] fallback: Do not remove vars while listing var names` | ||
|
||
------------------------------------------------------------------------------- | ||
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 close 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. | ||
------------------------------------------------------------------------------- | ||
[your text here] | ||
This was manually built on Debian Buster, to make it possible to reproduce, | ||
since we currently don't make development tools publicly available on Endless | ||
OS. The versions of gcc, binutils and gnu-efi are listed bellow. | ||
|
||
gcc 8.3.0-4 | ||
binutils 2.31.1-15 | ||
gnu-efi 3.0.9-1 | ||
|
||
Inspired by Debian's own submission, we are providing a Dockerfile in this repo | ||
that can be used to reproduce the build pulling all dependencies from the | ||
Debian repositories -- instructions are availabled in BUILDING.txt. | ||
|
||
------------------------------------------------------------------------------- | ||
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] | ||
https://github.com/endlessm/shim-review/blob/endless-shim-x64-20190410/logs.txt | ||
|
||
------------------------------------------------------------------------------- | ||
Add any additional information you think we may need to validate this shim | ||
------------------------------------------------------------------------------- | ||
[your text here] | ||
The `debian` directory with the package building recipes and scripts, vendor | ||
certificate included in the shim image etc, is available at | ||
https://github.com/endlessm/shim/commits/debian-master, commit id | ||
`0ca72677098e173e4d48e67d3d7e9344d25f408c`. | ||
|
||
We already ship a previous version of shim with same patches listed above, | ||
signed by Microsoft, in our currently available releases. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Vendor: Endless | ||
Vendor-URL: http://www.endlessos.com/ | ||
Bugs: https://community.endlessos.com/ | ||
Parent: Debian |
Oops, something went wrong.