- 23 Jun, 2021 2 commits
-
-
Matt Devillier authored
Grepping on just 'Disk' can lead to disk UUID identifier strings being added to /tmp/disklist, which then fail to parse later on. Avoid this by grepping on 'Disk /dev' instead. Signed-off-by:
Matt DeVillier <matt.devillier@puri.sm>
-
On machines without a TPM, we'd still like some way for the BIOS to attest that it has not been modified. With a Librem Key, we can have the BIOS use its own ROM measurement converted to a SHA256sum and truncated so it fits within an HOTP secret. Like with a TPM, a malicious BIOS with access to the correct measurements can send pre-known good measurements to the Librem Key. This approach provides one big drawback in that we have to truncate the SHA256sum to 20 characters so that it fits within the limitations of HOTP secrets. This means the possibility of collisions is much higher but again, an attacker could also capture and spoof an existing ROM's measurements if they have prior access to it, either with this approach or with a TPM. Signed-off-by:
Kyle Rankin <kyle.rankin@puri.sm>
-
- 18 Oct, 2020 1 commit
-
-
Tom Hiller authored
Signed-off-by:
Tom Hiller <thrilleratplay@gmail.com>
-
- 15 Oct, 2020 1 commit
-
-
alex-nitrokey authored
Update_checksum was already changing files in /boot, befor checking for gpg card. If no card is present, the user will end up in the recovery next time instead of getting the same dialog again. Therefore, the confirm_gpg_card should be checked before altering files. The dead -u flag/$update_counter is used to mark the necessisty to update the hash files now.
-
- 16 Sep, 2020 1 commit
-
-
Matt Devillier authored
Currently, exiting the recovery shell results in a kernel panic, necessitating a hard reset / power cycle. As this is less than ideal, drop the exec and add a loop to restart the shell. Addresses issue #833 Tested under qemu-coreboot-fbwhiptail Signed-off-by:
Matt DeVillier <matt.devillier@puri.sm>
-
- 03 Aug, 2020 1 commit
-
-
Matt Devillier authored
Using 'let' in these scripts fails when evaluating to zero for some reason, so replace with '$(())' which works as intended. Test: Boot device selection menu shown properly when new/unpartitioned drive installed. Signed-off-by:
Matt DeVillier <matt.devillier@puri.sm>
-
- 13 Jul, 2020 1 commit
-
-
Matt Devillier authored
For the handful of operations which need to be done with /boot as the pwd, encapsulate them in subshells to ensure the pwd doesn't unexpectedly change for other operations, as functions which need to mount/unmount /boot may fail if the pwd isn't root. Also, set the pwd to root at the start of detect_boot_device as an added safety measure. Test: run oem-factory-reset function, ensure it doesn't fail to detect boot device due to incorrect working directory. Signed-off-by:
Matt DeVillier <matt.devillier@puri.sm>
-
- 18 Nov, 2019 2 commits
-
-
Matt Devillier authored
Signed-off-by:
Matt DeVillier <matt.devillier@puri.sm>
-
Matt Devillier authored
If kexec-sign-config fails due to GPG key not present, the double die() results in a kernel panic (and if it didn't, /boot would be left mounted RW). Fix this by removing call to die() and ensuring /boot remounted RO regardless checksum update success or failure. Signed-off-by:
Matt DeVillier <matt.devillier@puri.sm>
-
- 21 Aug, 2019 1 commit
-
-
Matt Devillier authored
Add function to detect boot device. Start by checking CONFIG_BOOT_DEV, then iterate thru all bootable partitions. Check if partition is mountable, contains grub directory. Update CONFIG_BOOT_DEV and mount on /boot if successful. Signed-off-by:
Matt DeVillier <matt.devillier@puri.sm>
-
- 05 Aug, 2019 1 commit
-
-
Matt Devillier authored
Initial card detection can sometimes fail, so prompt the user to remove/reinsert their GPG card before retrying. Since errexit is likely set, disable it prior to calling --card-status so we can handle the error ourself, then re-set if necessary when done. Signed-off-by:
Matt DeVillier <matt.devillier@puri.sm>
-
- 12 Jul, 2019 1 commit
-
-
Matt Devillier authored
Move the non-GUI component of update_checksums() to /etc/functions so it can be reused outside of gui-init. Add check that /boot/kexec_default_hashes.txt exists before parsing it, since doesn't exist if there's no default boot target set yet. Eliminates spurious error text and/or premature exit depending on state of errexit. Signed-off-by:
Matt DeVillier <matt.devillier@puri.sm>
-
- 24 Feb, 2019 2 commits
-
-
Thierry Laurion authored
-
Thierry Laurion authored
-
- 08 Feb, 2019 1 commit
-
-
Kyle Rankin authored
-
- 07 Dec, 2018 3 commits
-
-
Kyle Rankin authored
-
Kyle Rankin authored
If we sort | uniq config options, then the lowest in the sort will get precedence, when what we want is for user preferences to override system ones.
-
Kyle Rankin authored
There are cases when grepping for an option in the config file where grep will not find it, which is fine in this case, but without adjusting the exit code in that case it can make an entire script bail out.
-
- 06 Dec, 2018 2 commits
-
-
Kyle Rankin authored
We need to handle the case where the specific config file doesn't exist, or else grep fails, so we touch the file ahead of time. Mounting the usb storage caused problems when you re-enter the menu a second time, so we will just load the storage module.
-
Kyle Rankin authored
As part of the config gui we want to be able to have the system define new config options without them being lost if the user makes their own changes in CBFS. To allow that this change creates a function initiated in init that combines all /etc/config* files into /tmp/config. All existing scripts have been changed to source /tmp/config instead of /etc/config. The config-gui.sh script now uses /etc/config.user to hold user configuration options but the combine_configs function will allow that to expand as others want to split configuration out further. As it stands here are the current config files: /etc/config -- Compiled-in configuration options /etc/config.user -- User preferences that override /etc/config /tmp/config -- Running config referenced by the BIOS, combination of existing configs
-
- 19 Jun, 2018 1 commit
-
-
Kyle Rankin authored
The Librem Key is a custom device USB-based security token Nitrokey is producing for Purism and among other things it has custom firmware created for use with Heads. In particular, when a board is configured with CONFIG_LIBREMKEY, this custom firmware allows Heads to use the sealed TOTP secret to also send an HOTP authentication to the Librem Key. If the HOTP code is successful, the Librem Key will blink a green LED, if unsuccessful it will blink red, thereby informing the user that Heads has been tampered with without requiring them to use a phone to validate the TOTP secret. Heads will still use and show the TOTP secret, in case the user wants to validate both codes (in case the Librem Key was lost or is no longer trusted). It will also show the result of the HOTP verification (but not the code itself), even though the user should trust only what the Librem Key displays, so the user can confirm that both the device and Heads are in sync. If HOTP is enabled, Heads will maintain a new TPM counter separate from the Heads TPM counter that will increment each time HOTP codes are checked. This change also modifies the routines that update TOTP so that if the Librem Key executables are present it will also update HOTP codes and synchronize them with a Librem Key.
-
- 09 May, 2018 2 commits
-
-
Kyle Rankin authored
-
Kyle Rankin authored
Currently the TPM counter label is hard-coded. By changing it to a variable in this function we can reuse all of the TPM counter functions to create other monotonic counters in the TPM (if the hardware supports it) with custom labels.
-
- 22 Apr, 2018 1 commit
-
-
Francis Lam authored
-
- 20 Apr, 2018 1 commit
-
-
Francis Lam authored
-
- 10 Apr, 2018 1 commit
-
-
Trammell hudson authored
-
- 14 Mar, 2018 2 commits
-
-
Kyle Rankin authored
-
Kyle Rankin authored
There was a bug in the "force" boot mode where it would still fail if signatures didn't match. This was because the check_config function validates the signatures for kexec files. I've added a few conditionals here so that in the case of a forced boot mode, we can bypass those signature checks that would prevent boot and error out to a recovery console.
-
- 10 Mar, 2018 1 commit
-
-
Francis Lam authored
Enabled recovery serial console (tested on kgpe-d16) Minor fix to kexec-boot to correct xen boot Remove busybox power utils
-
- 25 Feb, 2018 1 commit
-
-
Francis Lam authored
Guarded linuxboot specific init entries Removed Makefile entries into separate file (conflicts with srcing /etc/config) Added CONFIG_BOOT_LOCAL/_REMOTE to control interface setup Fixed CONFIG_TPM usage
-
- 24 Feb, 2018 1 commit
-
-
persmule authored
if "CONFIG_TPM=y" is not present in the config file, functionalities needing TPM could be disabled, while leaving other functionalities intact. This will make Heads a more general-usage bootloader payload atop coreboot.
-
- 15 Feb, 2018 2 commits
-
-
persmule authored
USB smart card readers are most full speed devices, and there is no "rate-matching hubs" beneath the root hub on older (e.g. GM45) plat- forms, which has companion OHCI or UHCI controllers and needs cor- responding drivers to communicate with card readers directly plugged into the motherboard, otherwise a discrete USB hub should be inserted between the motherboard and the reader. This time I make inserting linux modules for OHCI and UHCI controllable with option CONFIG_LINUX_USB_COMPANION_CONTROLLER. A linux config for x200 is added as an example. Tested on my x200s and elitebook revolve 810g1.
-
persmule authored
if "CONFIG_TPM=y" is not present in the config file, functionalities needing TPM could be disabled, while leaving other functionalities intact. This will make Heads a more general-usage bootloader payload atop coreboot.
-
- 02 Sep, 2017 1 commit
-
-
Francis Lam authored
Closes #222
-
- 18 Jul, 2017 1 commit
-
-
Trammell Hudson authored
-
- 08 Jul, 2017 1 commit
-
-
Francis Lam authored
Changed the checking of required hashes or required rollback state to be right before boot, allowing the user to sign/set defaults in interactive mode. Also cleaned up usages of recovery and fixed iso parameter regression.
-
- 04 Jul, 2017 1 commit
-
-
Francis Lam authored
Similar to qubes-update, it will save then verify the hashes of the kexec files. Once TOTP is verified, a normal boot will verify that the file hashes and all the kexec params match and if successful, boot directly to OS. Also added a config option to require hash verification for non-recovery boots, failing to recovery not met.
-
- 29 Apr, 2017 1 commit
-
-
Francis Lam authored
Supports booting from USB media using either the root device or a signed ISO as the boot device. Boot options are parsed with quick/dirty shell scripts to infer kexec params. Closes #195 and begins to address #196
-
- 12 Apr, 2017 1 commit
-
-
Trammell Hudson authored
-