heads/initrd/bin
Thierry Laurion 0cef8e1edc cryptsetup2 toolstack version bump and script fixes to support multi-LUKS containers (BTRFS QubesOS 4.2)
cryptsetup2 2.6.1 is a new release that supports reencryption of Q4.2 release LUKS2 volumes created at installation.
 This is a critical feature for the Qubes OS 4.2 release for added data at rest protection

Cryptsetup 2.6.x internal changes:
 - Argon2 used externally and internally: requires a lot of RAM and CPU to derivate passphrase to key validated in key slots.
  - This is used to rate limit efficiently bruteforcing of LUKS key slots, requiring each offline brute force attempt to consume ~15-30 seconds per attempt
  - OF course, strong passphrases are still recommended, but bruteforcing LUKSv2 containers with Argon2 would require immense time, ram and CPU even to bruteforce low entropy passphrase/PINs.
 - passphrase change doesn't permit LUKS key slot specification anymore: key slot rotates (new one consusumed per op: then old one wiped internally. EG: LUKS key slot 1 created, then 0 deleted)
 - reencryption doesn't permit old call arguments. No more direct-io; inadmissively slow through AIO (async) calls, need workarounds for good enough perfs (arguments + newer kernel with cloudfare fixes in tree)

cryptsetup 2.6.1 requires:
 - lvm2 2.03.23, which is also included in this PR.
   - requires libaio, which is also included in this PR (could be hacked out but deep dependency at first sight: left in)
   - requires util-linux 2.39
 - patches for reproducible builds are included for above 3 packages.

luks-functions was updated to support the new cryptsetup2 version calls/changes
 - reencryption happen in direct-io, offline mode and without locking, requiring linux 5.10.9+ to bypass linux queues
   - from tests, this is best for performance and reliability in single-user mode
 - LUKS container ops now validate Disk Recovery Key (DRK) passphrase prior and DRK key slot prior of going forward if needed, failing early.
  - Heads don't expect DRK to be in static key slot anymore, and finds the DRK key slot dynamically.
  - If reencrytipn/passphrase change: make sure all LUKS containers on same block device can be unlocked with same DRK
 - Reencryption: requires to know which key slot to reencrypt.
   - Find LUKS key slot that unlocks with DRK passphrase unlock prior of reencrypt call
 - Passphrase change: no slot can be passed, but key slot of DRK rotates.

kexec-seal-key
 - TPM LUKS Disk Unlock Key key slots have changed to be set in max slots per LUKS version (LUKSv1:7 /LUKSv2: 31)
  - If key slot != default LUKS version's keyslot outside of DRK key slot: prompt the user before wiping that key slot, otherwise wipe automatically
    - This takes for granted that the DRK key slot alone is needed on the system and Heads controls the LUKS key slots.
      - If user has something else going on, ie: Using USB Security dongle + TPM DUK, then the user will need to say no when wiping keys.
      - It was suggested to leave LUKS key slots outside of DRK alone, but then: what to do when all key slots would be used?
        - Alternative implementation could be to only prompt users to wipe keyslots other then DRK when key slots are all used (LUKSv1: 0-7, LUKSv2: 0-31)
          - But then cleanup would need to happen prior of operations (LUKS passphrase change, TPM DUK setup) and could be problematic.
  - LUKS containers now checked to be same LUKS version prior of permitting to set TPM DUK and will refuse to go forward of different versions.

TODO:
- async (AIO) calls are not used. direct-io is used instead. libaio could be hacked out
  - this could be subject to future work

Notes:
- time to deprecated legacy boards the do not enough space for the new space requirements
 - x230-legacy, x230-legacy-flash, x230-hotp-legacy
 - t430-legacy, t430-legacy-flash, t430-hotp-legacy already deprecated

Unrelated:
- typos fixes found along the way

Signed-off-by: Thierry Laurion <insurgo@riseup.net>
2024-10-30 14:18:20 -04:00
..
basic-autoboot.sh Add PureBoot Basic Mode 2023-06-21 13:26:45 -04:00
cbfs-init TPM extend ops: Augment output of TPM1/TMP22 for filename and file content hash ops 2024-09-06 17:15:53 -04:00
cbfs.sh all scripts: replace TRACE manual strings with dynamic tracing by bash debug 2024-02-01 15:48:27 -05:00
change-time.sh change-time.sh: Remind of the system time when beginning 2024-08-06 14:01:49 -04:00
config-gui.sh config-gui.sh: fix bug happening when clearing all user config settings/calling config-gui.sh from recovery shell 2024-10-29 15:21:51 -04:00
flash-gui.sh Add functions to handle normal, warning, and error for whiptail and fbwhiptail. 2024-06-25 17:26:14 +00:00
flash.sh flash.sh: remove last references in code to flashrom, use more generic FLASH_OPTIONS instead, might cchange in the future. 2024-10-29 08:58:09 -04:00
flashprog-kgpe-d16-openbmc.sh kgpe-d16 server: TODO AST1100 patch still missing @i-c-o-n https://github.com/linuxboot/heads/blob/master/patches/flashrom-b1f858f65b2abd276542650d8cb9e382da258967/0100-enable-kgpe-d16.patch 2024-10-29 08:58:09 -04:00
generic-init all scripts: replace TRACE manual strings with dynamic tracing by bash debug 2024-02-01 15:48:27 -05:00
gpg-gui.sh Add functions to handle normal, warning, and error for whiptail and fbwhiptail. 2024-06-25 17:26:14 +00:00
gpgv all scripts: replace TRACE manual strings with dynamic tracing by bash debug 2024-02-01 15:48:27 -05:00
gui-init oem-factory-reset gui-init: fix whiptail_error segfaulting because selfcalling itself, fix typo in gui-init 2024-09-04 14:26:57 -04:00
gui-init-basic Add functions to handle normal, warning, and error for whiptail and fbwhiptail. 2024-06-25 17:26:14 +00:00
inject_firmware.sh initrd/bin/inject_firmware.sh: Fix warning command 2024-01-19 09:53:53 -05:00
kexec-boot kexec-boot: Only capture kexec -d output to log, not console/kmsg 2024-04-19 14:14:54 -04:00
kexec-insert-key TPM extend ops: Augment output of TPM1/TMP22 for filename and file content hash ops 2024-09-06 17:15:53 -04:00
kexec-iso-init kexec-iso-init: Always show kernel arguments suppressions/additions overrides 2024-10-16 18:33:02 -04:00
kexec-parse-bls all scripts: replace TRACE manual strings with dynamic tracing by bash debug 2024-02-01 15:48:27 -05:00
kexec-parse-boot all scripts: replace TRACE manual strings with dynamic tracing by bash debug 2024-02-01 15:48:27 -05:00
kexec-save-default cryptsetup2 toolstack version bump and script fixes to support multi-LUKS containers (BTRFS QubesOS 4.2) 2024-10-30 14:18:20 -04:00
kexec-save-key all scripts: replace TRACE manual strings with dynamic tracing by bash debug 2024-02-01 15:48:27 -05:00
kexec-seal-key cryptsetup2 toolstack version bump and script fixes to support multi-LUKS containers (BTRFS QubesOS 4.2) 2024-10-30 14:18:20 -04:00
kexec-select-boot TPM extend ops: Augment output of TPM1/TMP22 for filename and file content hash ops 2024-09-06 17:15:53 -04:00
kexec-sign-config all scripts: replace TRACE manual strings with dynamic tracing by bash debug 2024-02-01 15:48:27 -05:00
kexec-unseal-key kexec-insert-key: refactor tampering check for encrypted disk keys prior of TPM unsealing ops 2024-04-11 14:50:40 -04:00
key-init key-init: If time resets, tell user to set it, but allow skipping 2024-09-06 09:27:37 -04:00
lock_chip all scripts: replace TRACE manual strings with dynamic tracing by bash debug 2024-02-01 15:48:27 -05:00
media-scan Add functions to handle normal, warning, and error for whiptail and fbwhiptail. 2024-06-25 17:26:14 +00:00
mount-usb Add functions to handle normal, warning, and error for whiptail and fbwhiptail. 2024-06-25 17:26:14 +00:00
network-init-recovery initrd/bin/network-init-recovery: kill dropbear unconditionally prior of starting it 2024-02-23 12:17:47 -05:00
oem-factory-reset cryptsetup2 toolstack version bump and script fixes to support multi-LUKS containers (BTRFS QubesOS 4.2) 2024-10-30 14:18:20 -04:00
oem-system-info-xx30 Add functions to handle normal, warning, and error for whiptail and fbwhiptail. 2024-06-25 17:26:14 +00:00
poweroff nitropad-nx: use standard shutdown/reboot commands 2024-06-20 18:27:05 +02:00
qubes-measure-luks TPM extend ops: Augment output of TPM1/TMP22 for filename and file content hash ops 2024-09-06 17:15:53 -04:00
reboot nitropad-nx: use standard shutdown/reboot commands 2024-06-20 18:27:05 +02:00
root-hashes-gui.sh Add functions to handle normal, warning, and error for whiptail and fbwhiptail. 2024-06-25 17:26:14 +00:00
seal-hotpkey Add functions to handle normal, warning, and error for whiptail and fbwhiptail. 2024-06-25 17:26:14 +00:00
seal-totp all scripts: replace TRACE manual strings with dynamic tracing by bash debug 2024-02-01 15:48:27 -05:00
setconsolefont.sh all scripts: replace TRACE manual strings with dynamic tracing by bash debug 2024-02-01 15:48:27 -05:00
talos-init initrd/bin/talos-init: remove alias for cbmem and bump coreboot revision 2023-07-12 14:50:54 +02:00
tpm-reset TPM2 DUK and TOTP/HOTP reseal fix, refactoring and ifferenciating tpm_password into tpm_owner_password and reusing correctly 2023-11-01 10:07:27 -04:00
tpmr TPM extend ops: Augment output of TPM1/TMP22 for filename and file content hash ops 2024-09-06 17:15:53 -04:00
uefi-init tpm2-tools: Change sense of CONFIG_TPM to mean any TPM, not just TPM1. 2023-03-08 12:45:46 -05:00
unpack_initramfs.sh all scripts: replace TRACE manual strings with dynamic tracing by bash debug 2024-02-01 15:48:27 -05:00
unseal-hotp Fix HOTP verification logic (and counter increment) in gui-init and oem-factory-reset scripts 2024-04-22 17:24:21 -04:00
unseal-totp all scripts: replace TRACE manual strings with dynamic tracing by bash debug 2024-02-01 15:48:27 -05:00
usb-autoboot.sh Add USB autoboot feature to PureBoot Basic 2023-06-21 13:26:46 -04:00
usb-init all scripts: replace TRACE manual strings with dynamic tracing by bash debug 2024-02-01 15:48:27 -05:00
wget-measure.sh all scripts: replace TRACE manual strings with dynamic tracing by bash debug 2024-02-01 15:48:27 -05:00
wipe-totp Implement Restricted Boot Mode 2023-06-21 13:26:45 -04:00
xx30-flash.init Combine t430-flash.init, x23-flash.init, fix insmod 2023-03-13 13:23:29 -04:00