The GetImageInfo() function of the UEFI Firmware Management Protocol
returns the authentication required attribute correctly in
AttributesSetting only for the first image; fix this.

Fixes: 88a2ef2720f5 ("efi_loader: Enable uefi capsule authentication")
Signed-off-by: Vincent Stehlé <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: Sughosh Ganu <[email protected]>
---
 lib/efi_loader/efi_firmware.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/efi_loader/efi_firmware.c b/lib/efi_loader/efi_firmware.c
index b41969c70fd..84de95f5c23 100644
--- a/lib/efi_loader/efi_firmware.c
+++ b/lib/efi_loader/efi_firmware.c
@@ -364,7 +364,7 @@ static efi_status_t efi_fill_image_desc_array(
 
                /* Check if the capsule authentication is enabled */
                if (IS_ENABLED(CONFIG_EFI_CAPSULE_AUTHENTICATE))
-                       image_info[0].attributes_setting |=
+                       image_info[i].attributes_setting |=
                                IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED;
 
                image_info[i].hardware_instance = 1;

-- 
2.53.0

Reply via email to