Skip to content

MA-24310 Fix bug: imx_signer failed to sign Android bootloader on i.MX 8m - #8

Open
github-sunxc wants to merge 1 commit into
nxp-imx-support:masterfrom
github-sunxc:8m_bootloader_sign_fix
Open

MA-24310 Fix bug: imx_signer failed to sign Android bootloader on i.MX 8m#8
github-sunxc wants to merge 1 commit into
nxp-imx-support:masterfrom
github-sunxc:8m_bootloader_sign_fix

Conversation

@github-sunxc

Copy link
Copy Markdown

Android with i.MX 8m platform used HABv4 to verify the signed bootloader. To make sure all of components in bootloader image be signed, we enabled a optional function on Android bootloader: Add optional FIT FDT signature (CVE-2023-39902).
But this tool failed to sign Android bootloader because incorrect CSF generated. To fix this issue, the optional IVT should use a local image table to generate the CSF file.

@utkarshguptanxp

Copy link
Copy Markdown
Contributor

Please provide more deatils on the issue and resolution provided.

…X 8m

Android with i.MX 8m platform used HABv4 to verify the signed bootloader.
To make sure all of components in bootloader image be signed, we enabled
a optional function on Android bootloader: Add optional FIT FDT signature
(CVE-2023-39902).
But this tool failed to sign Android bootloader because incorrect CSF
generated. To fix this issue, the optional IVT should use a local image
table to generate the CSF file.

Signed-off-by: Maximus <maximus.sun@nxp.com>
@github-sunxc
github-sunxc force-pushed the 8m_bootloader_sign_fix branch from 748f0c1 to 53fe6a6 Compare December 25, 2025 02:41
@utkarshguptanxp

Copy link
Copy Markdown
Contributor

Hi @github-sunxc , please provide an unsigned image that can be tested to reprodduce this issue.

@github-sunxc

Copy link
Copy Markdown
Author

bootloader.zip

@github-sunxc

Copy link
Copy Markdown
Author

Hi, there are two files in attachment, the "bootloader-imx8mp-trusty-dual.img" is bootloader with "fit fdt" enablement, you can try to sign this file, then the sign flow will pass but "container_2.csf" has wrong format.

@utkarshguptanxp

Copy link
Copy Markdown
Contributor

@github-sunxc I looked into the files and it seems the .img file is the FIT image. The yocto enablement currently supports only BSP images which contain either IVT or Container header. Signing just a FIT image is not supported. Do you see the same issue when you singed the combined flash.bin image? (SPL + FIT)

@github-sunxc

github-sunxc commented Jan 14, 2026

Copy link
Copy Markdown
Author

The .img file is not a pure FIT image, 2 IVT insided. Here is struct graph:
8mm_bootloader

Also, I have another question, 95 bootloader failed to sign on Android and BSP images, will you support it in the future?

@utkarshguptanxp

Copy link
Copy Markdown
Contributor

Hi @github-sunxc , the tool currently only support images that i.MX can boot out of BootROM. IVT and Container are the only supported formats which is what this tool supports.
Qn: For android, doesnt BSP also generate a flash.bin/imx-boot image from Yocto perspective? Please advice how the images are generated so that we can look into how we can support signing android images.
yes 95 will be supported. I am working on a release.

@github-sunxc

Copy link
Copy Markdown
Author

Yes, you can check this patch: LFU-573-2 imx8m: Reserve new IVT+CSF for FIT FDT signature. Which in "imx-mkimage" repo, you can get this repo by following command:
git clone ssh://bitbucket.sw.nxp.com/imx/imx-mkimage

Infact, there are 3 ivt in BSP bootloader images, but BSP secure boot not check the third ivt, so BSP secure boot can pass even through the third csf is wrong. If we can get a correct format of third csf, the Android auto sign can pass too.

@utkarshguptanxp

Copy link
Copy Markdown
Contributor

Thats unlikely as we have specifically covered this issue. Please check: https://github.com/nxp-imx-support/nxp-cst-signer/blob/master/src/imx_signer.c#L1610
We are processing 3 IVTs, SPL IVT, FIT IVT and new IVT within FIT structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants