diff options
author | Luca Boccassi <bluca@debian.org> | 2023-07-28 10:56:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-28 10:56:41 +0200 |
commit | 80256e8c547b05b066e46f228ae8841ebb4f9889 (patch) | |
tree | 10571d83f6e8403fd128d0dc6730277ab6d09acf | |
parent | Merge pull request #28430 from keszybz/cleanups (diff) | |
parent | boot: Fall back to using image load address for stack guard (diff) | |
download | systemd-80256e8c547b05b066e46f228ae8841ebb4f9889.tar.xz systemd-80256e8c547b05b066e46f228ae8841ebb4f9889.zip |
Merge pull request #28527 from medhefgo/boot-stack-guard
boot: Fall back to using image load address for stack guard
-rw-r--r-- | src/boot/efi/log.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/boot/efi/log.c b/src/boot/efi/log.c index 93631aca94..dd651bf18e 100644 --- a/src/boot/efi/log.c +++ b/src/boot/efi/log.c @@ -79,6 +79,9 @@ void __stack_chk_guard_init(void) { EFI_RNG_PROTOCOL *rng; if (BS->LocateProtocol(MAKE_GUID_PTR(EFI_RNG_PROTOCOL), NULL, (void **) &rng) == EFI_SUCCESS) (void) rng->GetRNG(rng, NULL, sizeof(__stack_chk_guard), (void *) &__stack_chk_guard); + else + /* Better than no extra entropy. */ + __stack_chk_guard ^= (intptr_t) &__ImageBase; } #endif |