From c4a0933165c7093c2ca52c9ee94e4b074fc9f3f7 Mon Sep 17 00:00:00 2001 From: Stefan Haberland Date: Tue, 31 Mar 2020 19:01:32 +0200 Subject: [PATCH] zipl: prevent endless loop during IPL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In case secure boot is enabled but no components in the IPL report are found it ends up in an endless loop in the component verification. To prevent this check if components are found and exit if not. Signed-off-by: Stefan Haberland Reviewed-by: Philipp Rudo Signed-off-by: Jan Höppner --- zipl/boot/stage3.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zipl/boot/stage3.c b/zipl/boot/stage3.c index 958f9ff7..480190ad 100644 --- a/zipl/boot/stage3.c +++ b/zipl/boot/stage3.c @@ -106,6 +106,10 @@ is_verified_address(unsigned long image_addr) rb_hdr = (void *) rb_hdr + rb_hdr->len; } + + if (!comps) + return 0; + for_each_rb_entry(comp, comps) { if (image_addr == comp->addr && comp->flags & IPL_RB_COMPONENT_FLAG_SIGNED &&