diff options
author | Christian Breunig <christian@breunig.cc> | 2024-09-04 21:37:11 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2024-09-14 23:05:23 +0200 |
commit | fd737172f1068870fe1ededbe9b2ed4a86663acd (patch) | |
tree | 57ed7c8ab104316b7530f79f67db5e9c885ad8a2 /data/live-build-config/includes.chroot/var | |
parent | beb3df0733d8cf682291e19b0df0871da20ab5d4 (diff) | |
download | vyos-build-fd737172f1068870fe1ededbe9b2ed4a86663acd.tar.gz vyos-build-fd737172f1068870fe1ededbe9b2ed4a86663acd.zip |
T861: add UEFI Secure Boot support
This adds support for UEFI Secure Boot. It adds the missing pieces to the Linux
Kernel and enforces module signing. This results in an additional security
layer where untrusted (unsigned) Kernel modules can no longer be loaded into
the live system.
NOTE: This commit will not work unless signing keys are present. Arbitrary
keys can be generated using instructions found in:
data/live-build-config/includes.chroot/var/lib/shim-signed/mok/README.md
Diffstat (limited to 'data/live-build-config/includes.chroot/var')
-rw-r--r-- | data/live-build-config/includes.chroot/var/lib/shim-signed/mok/README.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/data/live-build-config/includes.chroot/var/lib/shim-signed/mok/README.md b/data/live-build-config/includes.chroot/var/lib/shim-signed/mok/README.md new file mode 100644 index 00000000..5a6edbba --- /dev/null +++ b/data/live-build-config/includes.chroot/var/lib/shim-signed/mok/README.md @@ -0,0 +1,22 @@ +# Secure Boot + +## CA + +Create Certificate Authority used for Kernel signing. CA is loaded into the +Machine Owner Key store on the target system. + +```bash +openssl req -new -x509 -newkey rsa:2048 -keyout MOK.key -outform DER -out MOK.der -days 36500 -subj "/CN=VyOS Secure Boot CA/" -nodes +openssl x509 -inform der -in MOK.der -out MOK.pem +``` + +## Kernel Module Signing Key + +We do not make use of ephemeral keys for Kernel module signing. Instead a key +is generated and signed by the VyOS Secure Boot CA which signs all the Kernel +modules during ISO assembly if present. + +```bash +openssl req -newkey rsa:2048 -keyout kernel.key -out kernel.csr -subj "/CN=VyOS Secure Boot Signer 2024 - linux/" -nodes +openssl x509 -req -in kernel.csr -CA MOK.pem -CAkey MOK.key -CAcreateserial -out kernel.pem -days 730 -sha256 +``` |