Skip to content

Commit b86b909

Browse files
blucavathpela
authored andcommitted
README: mention new loader protocol and interaction with UKIs
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
1 parent fb77b44 commit b86b909

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,42 @@ instance) it will then validate the binary against a built-in certificate. If
88
this succeeds and if the binary or signing key are not forbidden then shim
99
will relocate and execute the binary.
1010

11+
## protocols
12+
13+
### shim lock protocol
14+
1115
shim will also install a protocol which permits the second-stage bootloader
1216
to perform similar binary validation. This protocol has a GUID as described
1317
in the shim.h header file and provides a single entry point. On 64-bit systems
1418
this entry point expects to be called with SysV ABI rather than MSABI, so calls
1519
to it should not be wrapped.
1620

21+
### shim loader protocol
22+
23+
Since version 16.1 shim overrides the system table and installs its own version
24+
of the LoadImage()/StartImage()/UnloadImage()/Exit() functions, so that second
25+
stages can simply call them from the system table, and it will work whether shim
26+
is first stage or not, without requiring shim-specific code in the second stages.
27+
28+
When this protocol is installed, signed UKIs
29+
[Unified Kernel Images](https://uapi-group.org/specifications/specs/unified_kernel_image/)
30+
can be loaded even if the nested kernel is not signed, as after the UKI is loaded
31+
and validated, shim builds an internal allowlist of all the sections that are
32+
contained in the UKI. When an image is loaded from one such section, it is
33+
validated against denylists (DBX/MOKX/SBAT at the time of writing), but it is
34+
not checked against allowlists (DB/MOK hashes/signatures), as the outer image
35+
was already validated and the inner image is thus covered by those signatures or
36+
hashes. Furthermore, the inner image is not measured in the TPM, to avoid double
37+
measurements.
38+
39+
## TPM
40+
1741
On systems with a TPM chip enabled and supported by the system firmware,
1842
shim will extend various PCRs with the digests of the targets it is
1943
loading. A full list is in the file [README.tpm](README.tpm) .
2044

45+
## builds and tests
46+
2147
To use shim, simply place a DER-encoded public certificate in a file such as
2248
pub.cer and build with `make VENDOR_CERT_FILE=pub.cer`.
2349

@@ -26,6 +52,8 @@ build, described in [BUILDING](BUILDING).
2652

2753
See the [test plan](testplan.txt), and file a ticket if anything fails!
2854

55+
## contacts
56+
2957
In the event that the developers need to be contacted related to a security
3058
incident or vulnerability, please mail [secalert@redhat.com].
3159

0 commit comments

Comments
 (0)