From f163b063504fa63a519a6c1b2a9b1afdd792aed1 Mon Sep 17 00:00:00 2001 From: Vivek Mittal Date: Thu, 10 Sep 2026 10:54:16 +0530 Subject: [PATCH] fix(stage0): return after failed stage1 hash verification --- stage0/jump_stage1.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stage0/jump_stage1.c b/stage0/jump_stage1.c index dcbe645..2d9a24e 100644 --- a/stage0/jump_stage1.c +++ b/stage0/jump_stage1.c @@ -94,6 +94,11 @@ void ebldr_stage0_main(void) if (match1 || match2) { eos_boot_log_append(EOS_LOG_BOOT_FAIL, EOS_SLOT_NONE, 0xBAD1); eos_recovery_enter(&bctl); + /* eos_recovery_enter() only returns if it decides to reboot rather + * than halt. Either way, a Stage-1 that just failed its integrity + * check must never be jumped into — return so the corrupted image + * is never entered. */ + return; } eos_boot_log_append(EOS_LOG_IMAGE_VALID, EOS_SLOT_NONE, 0); #endif