Commit Graph

282 Commits

Author SHA1 Message Date
nikstur 71fb51225c
Merge pull request #309 from nix-community/renovate/lock-file-maintenance
chore(deps): lock file maintenance
2024-02-12 13:00:06 +00:00
renovate[bot] 26bc32726c
chore(deps): lock file maintenance 2024-02-12 01:40:40 +00:00
renovate[bot] 53fc3ad7fb
fix(deps): update all dependencies 2024-02-12 01:39:49 +00:00
nikstur f2bc0af580
Merge pull request #298 from nix-community/renovate/lock-file-maintenance
chore(deps): lock file maintenance
2024-02-05 08:19:56 +00:00
renovate[bot] bbab50ddcd
chore(deps): lock file maintenance 2024-02-05 03:39:38 +00:00
renovate[bot] 9e20be5eed
fix(deps): update all dependencies 2024-02-05 03:38:46 +00:00
nikstur c42edac7eb
Merge pull request #292 from nix-community/renovate/all
fix(deps): update rust crate serde_json to 1.0.112
2024-01-29 10:09:39 +00:00
renovate[bot] d47779be33
chore(deps): lock file maintenance 2024-01-29 03:16:47 +00:00
renovate[bot] 1d7bf54752
fix(deps): update rust crate serde_json to 1.0.112 2024-01-29 03:15:57 +00:00
renovate[bot] 80c7644582
chore(deps): lock file maintenance 2024-01-22 03:54:59 +00:00
nikstur 7b5a91408f
Revert "chore(deps): lock file maintenance" 2024-01-22 01:29:19 +01:00
nikstur 7ba84c0857
Merge pull request #289 from nix-community/renovate/lock-file-maintenance
chore(deps): lock file maintenance
2024-01-22 00:27:20 +00:00
renovate[bot] 57e329ffde
chore(deps): lock file maintenance 2024-01-22 00:20:31 +00:00
renovate[bot] 82898a7c31
fix(deps): update all dependencies 2024-01-22 00:19:38 +00:00
nikstur 234e4da1f3 rust-toolchain: 1.70 -> 1.75 2024-01-21 15:29:42 +01:00
renovate[bot] 78680cc51d
chore(deps): lock file maintenance 2024-01-15 10:18:29 +00:00
renovate[bot] 438cd262e4
chore(deps): update all dependencies 2024-01-15 00:17:37 +00:00
renovate[bot] 2d90d83018
fix(deps): update all dependencies 2024-01-08 19:11:43 +00:00
nikstur a454a58947
Merge pull request #275 from rbran/parse-os-release
Use the original os-release file parser
2024-01-05 23:38:19 +00:00
renovate[bot] 79a90e783b
fix(deps): update all dependencies 2024-01-02 10:13:03 +00:00
Rubens Brandao 05cb051f05
Use the original os-release file parser 2023-12-28 13:26:11 -03:00
Julien Malka f06680ea68 add more helpful message in case of append_initrd_secrets script failure 2023-12-27 20:43:19 +00:00
renovate[bot] 872f9f3ea8
fix(deps): update rust crate anyhow to 1.0.76 2023-12-25 02:00:56 +00:00
renovate[bot] 7b7fcbce58
fix(deps): update all dependencies 2023-12-11 00:54:29 +00:00
renovate[bot] 627be8398d
fix(deps): update rust crate clap to 4.4.10 2023-12-04 02:01:42 +00:00
Julian Stecklina dd18daae09 tool: parse systemd rc versions 2023-11-23 19:50:04 +01:00
Julian Stecklina e8ba04aab7 tool: extend SystemdVersion with patch level 2023-11-22 19:45:46 +01:00
Julian Stecklina 8e0d422697 stub: remove nondeterminism in binary
The linker embeds a timestamp into our UEFI stub. objdump -p
reports:

Time/Date               Mon Nov 13 20:02:35 2023

With /Brepro we get the following instead:

Time/Date		d597e888	(This is a reproducible build file hash, not a timestamp)

Fixes #260
2023-11-14 10:31:54 +01:00
renovate[bot] 752d2d4347
fix(deps): update all dependencies 2023-11-13 01:34:32 +00:00
Julian Stecklina bc0fd4e1d9
Merge pull request #254 from nix-community/renovate/all
fix(deps): update rust crate serde_json to 1.0.108
2023-11-08 19:59:35 +01:00
renovate[bot] ceb19c0732
chore(deps): lock file maintenance 2023-11-08 11:02:15 +00:00
renovate[bot] dd729cdaeb
fix(deps): update rust crate serde_json to 1.0.108 2023-11-06 00:54:20 +00:00
Julian Stecklina 3cb657f5c3 tool: silence resolver version warning
We are getting this warning:

warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest

Silence by opting into the new behavior.
2023-10-30 10:24:49 +01:00
Julian Stecklina 87d2087a7a tool: drop unused dependencies via machete 2023-10-30 10:22:41 +01:00
renovate[bot] e94d982208
chore(deps): lock file maintenance 2023-10-30 00:14:36 +00:00
renovate[bot] 03c2f52ee9
fix(deps): update all dependencies 2023-10-30 00:00:50 +00:00
Philipp Schuster b7f68a50e6 linux_loader: improve code quality
`Option<&T>` has the same ABI layout as `*const T`, so we have some room for
improvement where we get more Rust convenience. Further, a bug is fixed where
INVALID_PARAMETER wasn't returned when the BUFFER_SIZE pointer is NULL.

See UEFI 2.10 13.2.2. EFI_LOAD_FILE2_PROTOCOL.LoadFile() for reference.
2023-10-24 13:23:30 +02:00
renovate[bot] e0511f43e7
chore(deps): lock file maintenance 2023-10-23 00:26:27 +00:00
Julian Stecklina ec05d707f3 tool: always include version in PRETTY_NAME
... to give a consistent user experience in systemd-boot.

Fixes #220.
2023-10-20 11:55:53 +02:00
Julian Stecklina 3da3049bef tool: remove unhelpful wrappers and lightly refactor 2023-10-20 11:29:00 +02:00
renovate[bot] 853c81eef2
chore(deps): lock file maintenance 2023-10-19 20:29:32 +00:00
Julian Stecklina 778e21733b
Merge pull request #196 from nix-community/renovate/all
fix(deps): update all dependencies
2023-10-16 09:03:22 +00:00
Julian Stecklina bb5b2de545 stub: pin goblin (again)
... because of #237. Now renovate should ignore this.
2023-10-16 10:53:56 +02:00
Julian Stecklina 01b62a1c21
Merge branch 'master' into insecure-boot 2023-10-16 10:28:28 +02:00
renovate[bot] eabbae0e0c
fix(deps): update all dependencies 2023-10-16 01:54:44 +00:00
Alois Wohlschlager b02a7e2a7f
stub: use command line from loader in insecure mode
When booting without Secure Boot active, it is not necessary to defend
against a malicious command line being passed from the loader. So just
use it in this case, to facilitaty some debugging and recovery use
cases.

Fixes: https://github.com/nix-community/lanzaboote/issues/226
2023-10-15 16:04:30 +02:00
Alois Wohlschlager db39223a7c
stub: make handling of insecure boot more explicit
When Secure Boot is not available (unsupported or disabled), Lanzaboote
will attempt to boot kernels and initrds even when they fail the hash
verification. Previously, this would happen by falling back to use
LoadImage on the kernel, which fails if Secure Boot is available, as the
kernel is not signed.
The SecureBoot variable offers a more explicit way of checking whether
Secure Boot is available. If the firmware supports Secure Boot, it
initializes this variable to 1 if it is enabled, and to 0 if it is
disabled. Applications are not supposed to modify this variable, and in
particular, since only trusted applications are loaded when Secure Boot
is active, we can assume it is never changed to 0 or deleted if Secure
Boot is active.
Hence, we can be sure of Secure Boot being inactive if this variable is
absent or set to 0, and thus treat all hash verification errors as
non-fatal and proceed to boot arbitrary kernels and initrds (a warning
is still logged in this case). In all other cases, we treat all hash
verification failures as fatal security violations, as it must be done
in the case where Secure Boot is active (it is expected that this does
not lead to any false positives in practice, unless there are bigger
problems anyway).
2023-10-15 15:58:01 +02:00
Julian Stecklina c56ad52b18 stub: pin to current goblin version
goblin 0.7.1 introduces certification support for PE files. This seems to be broken, because we get:

Parsing PE failed Malformed entity: Unable to extract certificate. Probably cert_size:1599360838 is malformed!

from goblin when trying to parse our PE file in memory.

See #237 for context.
2023-10-15 15:40:57 +02:00
Julian Stecklina 17cadf6598 stub: update to latest uefi crates 2023-10-12 12:12:34 +02:00
Alois Wohlschlager 90a1adac54
tool: fix atomic write
Atomic write works by first writing a temporary file, then syncing that
temporary file to ensure it is fully on disk before the program can
continue, and in the last step renaming the temporary file to the
target. The middle step was missing, which is likely to lead to a
truncated target file being present after power loss. Add this step.

Furthermore, even with this fix, atomicity is not fully guaranteed,
because FAT32 can become corrupted after power loss due to its design
shortcomings. Even though we cannot really do anything about this case,
adjust the comment to at least acknowledge the situation.
2023-10-04 07:29:35 +02:00