You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
here maybe decrypt the image header data if the the size of image header is very short, for example.
in my test case ,i pack an encrypted image with the header size is 32 bytes, it will decrypt the header data ,and verify the decrypted image in the primary slot fail!. https://github.com/mcu-tools/mcuboot/blob/v2.1.0/boot/bootutil/src/loader.c
mcuboot/boot/bootutil/src/loader.c
Line 1294 in 9c99326
here maybe decrypt the image header data if the the size of image header is very short, for example.
in my test case ,i pack an encrypted image with the header size is 32 bytes, it will decrypt the header data ,and verify the decrypted image in the primary slot fail!.
https://github.com/mcu-tools/mcuboot/blob/v2.1.0/boot/bootutil/src/loader.c
so I try to fix it :
if(abs_off < hdr->ih_hdr_size)
{
blk_sz = tlv_off - hdr->ih_hdr_size + abs_off;
}else{
blk_sz = tlv_off - abs_off;
}
The text was updated successfully, but these errors were encountered: