Skip to contentSkip to conversation

Fit Signature booting without public key

DISCUSSION Manorit Chawdhry 4 participants 10 messages May 16, 2023 – May 31, 2023

lore
Share & tools
lore
#0 lore raw

Hi All,

I recently came upon a discussion that had happened a while back [0]. I want to continue the discussion as I believe the issue still persists and the checks around fit signature booting are still the same, that allows booting the fit without changing the uboot dtb.

Allowing the signed fit image without this seems to be a bypass that is available and should not be allowed without any gate to it for people who'd like to enforce these signing checks. Let me know if there is a config already available for it and if not, are there any plans to enable such a config in future. Would like to hear your opinions on this as I believe this should be fixed as soon as possible.

[0]: https://u-boot.denx.narkive.com/dEClg9dW/signed-fit-image-boots-without-public-key

Regards,
Manorit

#1 lore raw
Quoted 7 lines · Manorit Chawdhry

Hi All,

I recently came upon a discussion that had happened a while back [0]. I want to continue the discussion as I believe the issue still persists and the checks around fit signature booting are still the same, that allows booting the fit without changing the uboot dtb.

Quoted 8 lines

Allowing the signed fit image without this seems to be a bypass that is available and should not be allowed without any gate to it for people who'd like to enforce these signing checks. Let me know if there is a config already available for it and if not, are there any plans to enable such a config in future. Would like to hear your opinions on this as I believe this should be fixed as soon as possible.

[0]: https://u-boot.denx.narkive.com/dEClg9dW/signed-fit-image-boots-without-public-key

Yes, can you please reproduce the issue in question on the current tree, with a supported platform and provide the defconfig and steps you used for this issue? Thanks.

Signature · 1 line
Tom
#2 lore raw

Hi Tom,

Quoted 16 lines · Tom Rini
Quoted 14 lines · Manorit Chawdhry

Hi All,

I recently came upon a discussion that had happened a while back [0]. I want to continue the discussion as I believe the issue still persists and the checks around fit signature booting are still the same, that allows booting the fit without changing the uboot dtb.

Allowing the signed fit image without this seems to be a bypass that is available and should not be allowed without any gate to it for people who'd like to enforce these signing checks. Let me know if there is a config already available for it and if not, are there any plans to enable such a config in future. Would like to hear your opinions on this as I believe this should be fixed as soon as possible.

Quoted 7 lines
Quoted 1 line

[0]: https://u-boot.denx.narkive.com/dEClg9dW/signed-fit-image-boots-without-public-key

Yes, can you please reproduce the issue in question on the current tree, with a supported platform and provide the defconfig and steps you used for this issue? Thanks.

I've created a branch with some custom patches to make the fitimage booting currently, please try with the branch and the fitimage that are also committed [0].

The devices that I've tested this with is j721e-hs-evm, the defconfig to use for the builds are j721e_evm_r5_defconfig and j721e_evm_a72_defconfig. Although not synced up with the latest changes but for reference the SDK documentation can help if required [1].

Attached the logs for reference with the signed fitimage and an unsigned uboot without any modifications[2].

[0]: https://github.com/manorit2001/u-boot/tree/fit-image-poc
[1]: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/08_06_00_11/exports/docs/linux/Foundational_Components/U-Boot/UG-General-Info.html
[2]: https://gist.github.com/manorit2001/3c49cfc19bf937783efb75fd4cddc58f

Regards,
Manorit

Quoted 1 line

Tom

#3 lore raw
Quoted 36 lines · Manorit Chawdhry

Hi Tom,

Quoted 16 lines · Tom Rini
Quoted 14 lines · Manorit Chawdhry

Hi All,

I recently came upon a discussion that had happened a while back [0]. I want to continue the discussion as I believe the issue still persists and the checks around fit signature booting are still the same, that allows booting the fit without changing the uboot dtb.

Allowing the signed fit image without this seems to be a bypass that is available and should not be allowed without any gate to it for people who'd like to enforce these signing checks. Let me know if there is a config already available for it and if not, are there any plans to enable such a config in future. Would like to hear your opinions on this as I believe this should be fixed as soon as possible.

Quoted 7 lines
Quoted 1 line

[0]: https://u-boot.denx.narkive.com/dEClg9dW/signed-fit-image-boots-without-public-key

Yes, can you please reproduce the issue in question on the current tree, with a supported platform and provide the defconfig and steps you used for this issue? Thanks.

I've created a branch with some custom patches to make the fitimage booting currently, please try with the branch and the fitimage that are also committed [0].

The devices that I've tested this with is j721e-hs-evm, the defconfig to use for the builds are j721e_evm_r5_defconfig and j721e_evm_a72_defconfig. Although not synced up with the latest changes but for reference the SDK documentation can help if required [1].

Quoted 6 lines

Attached the logs for reference with the signed fitimage and an unsigned uboot without any modifications[2].

[0]: https://github.com/manorit2001/u-boot/tree/fit-image-poc
[1]: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/08_06_00_11/exports/docs/linux/Foundational_Components/U-Boot/UG-General-Info.html
[2]: https://gist.github.com/manorit2001/3c49cfc19bf937783efb75fd4cddc58f

I don't see the problem there, but please go and investigate what problem you're seeing. The intention is that yes, with the appropriate CONFIG settings, you can set U-Boot to only boot signed FIT configurations and unsigned ones should not boot.

Signature · 1 line
Tom
#4 lore raw

Hi Tom,

Quoted 40 lines · Tom Rini
Quoted 39 lines · Manorit Chawdhry

Hi Tom,

Quoted 16 lines · Tom Rini
Quoted 14 lines · Manorit Chawdhry

Hi All,

I recently came upon a discussion that had happened a while back [0]. I want to continue the discussion as I believe the issue still persists and the checks around fit signature booting are still the same, that allows booting the fit without changing the uboot dtb.

Allowing the signed fit image without this seems to be a bypass that is available and should not be allowed without any gate to it for people who'd like to enforce these signing checks. Let me know if there is a config already available for it and if not, are there any plans to enable such a config in future. Would like to hear your opinions on this as I believe this should be fixed as soon as possible.

Quoted 7 lines
Quoted 1 line

[0]: https://u-boot.denx.narkive.com/dEClg9dW/signed-fit-image-boots-without-public-key

Yes, can you please reproduce the issue in question on the current tree, with a supported platform and provide the defconfig and steps you used for this issue? Thanks.

I've created a branch with some custom patches to make the fitimage booting currently, please try with the branch and the fitimage that are also committed [0].

The devices that I've tested this with is j721e-hs-evm, the defconfig to use for the builds are j721e_evm_r5_defconfig and j721e_evm_a72_defconfig. Although not synced up with the latest changes but for reference the SDK documentation can help if required [1].

Attached the logs for reference with the signed fitimage and an unsigned uboot without any modifications[2].

Quoted 9 lines
Quoted 3 lines

[0]: https://github.com/manorit2001/u-boot/tree/fit-image-poc
[1]: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/08_06_00_11/exports/docs/linux/Foundational_Components/U-Boot/UG-General-Info.html
[2]: https://gist.github.com/manorit2001/3c49cfc19bf937783efb75fd4cddc58f

I don't see the problem there, but please go and investigate what problem you're seeing. The intention is that yes, with the appropriate CONFIG settings, you can set U-Boot to only boot signed FIT configurations and unsigned ones should not boot.

It boots with an unsigned fit too btw for reference [0]. The whole logic behind the authentication is that uboot stores the public key that is used for verification of the signed fit but apparantely if I haven't kept the public key in uboot dtb the fit images still boot whether signed or unsigned as that check is not guarded by anything if you see in the codebase[1].

[0]: https://gist.github.com/manorit2001/80c9242641141ac5bce0e335ea8a9f1a
[1]: https://github.com/u-boot/u-boot/blob/6dcee70692601bd3296c86ac07d0317bf06d2b7b/boot/image-fit-sig.c#L491-L496

Regards,
Manorit

Quoted 2 lines
Signature · 1 line
Tom
#5 lore raw
Quoted 60 lines · Manorit Chawdhry

Hi Tom,

Quoted 40 lines · Tom Rini
Quoted 39 lines · Manorit Chawdhry

Hi Tom,

Quoted 16 lines · Tom Rini
Quoted 14 lines · Manorit Chawdhry

Hi All,

I recently came upon a discussion that had happened a while back [0]. I want to continue the discussion as I believe the issue still persists and the checks around fit signature booting are still the same, that allows booting the fit without changing the uboot dtb.

Allowing the signed fit image without this seems to be a bypass that is available and should not be allowed without any gate to it for people who'd like to enforce these signing checks. Let me know if there is a config already available for it and if not, are there any plans to enable such a config in future. Would like to hear your opinions on this as I believe this should be fixed as soon as possible.

Quoted 7 lines
Quoted 1 line

[0]: https://u-boot.denx.narkive.com/dEClg9dW/signed-fit-image-boots-without-public-key

Yes, can you please reproduce the issue in question on the current tree, with a supported platform and provide the defconfig and steps you used for this issue? Thanks.

I've created a branch with some custom patches to make the fitimage booting currently, please try with the branch and the fitimage that are also committed [0].

The devices that I've tested this with is j721e-hs-evm, the defconfig to use for the builds are j721e_evm_r5_defconfig and j721e_evm_a72_defconfig. Although not synced up with the latest changes but for reference the SDK documentation can help if required [1].

Attached the logs for reference with the signed fitimage and an unsigned uboot without any modifications[2].

Quoted 9 lines
Quoted 3 lines

[0]: https://github.com/manorit2001/u-boot/tree/fit-image-poc
[1]: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/08_06_00_11/exports/docs/linux/Foundational_Components/U-Boot/UG-General-Info.html
[2]: https://gist.github.com/manorit2001/3c49cfc19bf937783efb75fd4cddc58f

I don't see the problem there, but please go and investigate what problem you're seeing. The intention is that yes, with the appropriate CONFIG settings, you can set U-Boot to only boot signed FIT configurations and unsigned ones should not boot.

It boots with an unsigned fit too btw for reference [0]. The whole logic behind the authentication is that uboot stores the public key that is used for verification of the signed fit but apparantely if I haven't kept the public key in uboot dtb the fit images still boot whether signed or unsigned as that check is not guarded by anything if you see in the codebase[1].

Quoted 2 lines

[0]: https://gist.github.com/manorit2001/80c9242641141ac5bce0e335ea8a9f1a
[1]: https://github.com/u-boot/u-boot/blob/6dcee70692601bd3296c86ac07d0317bf06d2b7b/boot/image-fit-sig.c#L491-L496

Alright, please let us know what you find as indeed if you've set all the right options it's not supposed to boot unsigned images.

Signature · 1 line
Tom
#6 lore raw

R: Fit Signature booting without public key

Hi,

Quoted 50 lines

Inviato: venerdì 26 maggio 2023 15:00
Oggetto: Re: Fit Signature booting without public key

Quoted 12 lines · Manorit Chawdhry

Hi Tom,

Quoted 9 lines · Tom Rini
Quoted 8 lines · Manorit Chawdhry

Hi Tom,

Quoted 5 lines · Tom Rini
Quoted 3 lines · Manorit Chawdhry

Hi All,

I recently came upon a discussion that had happened a while back

[0].

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

I want to continue the discussion as I believe the issue still persists and the checks around fit signature booting are still the same, that allows booting the fit without changing the uboot

dtb.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Allowing the signed fit image without this seems to be a bypass that is available and should not be allowed without any gate to it for people who'd like to enforce these signing checks. Let me know if there is a config already available for it and if not, are there any plans to enable such a config in future. Would like to hear your opinions on this as I believe this

should be fixed as soon as possible.

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 4 lines

[0]:
https://u-boot.denx.narkive.com/dEClg9dW/signed-fit-image-boot
s-without-public-key

Yes, can you please reproduce the issue in question on the current tree, with a supported platform and provide the defconfig and steps you used for this issue? Thanks.

--

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

I've created a branch with some custom patches to make the fitimage booting currently, please try with the branch and the fitimage that are also committed [0].

The devices that I've tested this with is j721e-hs-evm, the defconfig to use for the builds are j721e_evm_r5_defconfig and j721e_evm_a72_defconfig. Although not synced up with the latest changes but for reference the SDK documentation can help if required

[1].

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 25 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Attached the logs for reference with the signed fitimage and an unsigned uboot without any modifications[2].

[0]: https://github.com/manorit2001/u-boot/tree/fit-image-poc
[1]:
https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacint
o7/08_06_00_11/exports/docs/linux/Foundational_Components/U-

Boot/U

Quoted 17 lines
Quoted 10 lines
Quoted 4 lines

G-General-Info.html
[2]:
https://gist.github.com/manorit2001/3c49cfc19bf937783efb75fd4cddc5
8f

I don't see the problem there, but please go and investigate what problem you're seeing. The intention is that yes, with the appropriate CONFIG settings, you can set U-Boot to only boot signed FIT configurations and unsigned ones should not boot.

It boots with an unsigned fit too btw for reference [0]. The whole logic behind the authentication is that uboot stores the public key that is used for verification of the signed fit but apparantely if I haven't kept the public key in uboot dtb the fit images still boot whether signed or unsigned as that check is not guarded by anything if you see in the codebase[1].

Which uboot behaviour would you expect? If uboot is missing of the public key, it has no way to check signatures. Therefore either it boots everything (signed and unsigned) or it boots nothing (signed and unsigned). The second means it would be totally useless. So the first seems the only reasonable behaviour, IMO.

Massimo

Quoted 12 lines
Quoted 4 lines

[0]:
https://gist.github.com/manorit2001/80c9242641141ac5bce0e335ea8a9f1a
[1]:
https://github.com/u-boot/u-

boot/blob/6dcee70692601bd3296c86ac07d0317b

Quoted 1 line

f06d2b7b/boot/image-fit-sig.c#L491-L496

Alright, please let us know what you find as indeed if you've set all the right options it's not supposed to boot unsigned images.

--
Tom

#7 lore raw

Re: R: Fit Signature booting without public key

Hi,

Quoted 71 lines · Pegorer Massimo

Hi,

Quoted 69 lines

Inviato: venerdì 26 maggio 2023 15:00
Oggetto: Re: Fit Signature booting without public key

Quoted 12 lines · Manorit Chawdhry

Hi Tom,

Quoted 9 lines · Tom Rini
Quoted 8 lines · Manorit Chawdhry

Hi Tom,

Quoted 5 lines · Tom Rini
Quoted 3 lines · Manorit Chawdhry

Hi All,

I recently came upon a discussion that had happened a while back

[0].

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

I want to continue the discussion as I believe the issue still persists and the checks around fit signature booting are still the same, that allows booting the fit without changing the uboot

dtb.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Allowing the signed fit image without this seems to be a bypass that is available and should not be allowed without any gate to it for people who'd like to enforce these signing checks. Let me know if there is a config already available for it and if not, are there any plans to enable such a config in future. Would like to hear your opinions on this as I believe this

should be fixed as soon as possible.

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 4 lines

[0]:
https://u-boot.denx.narkive.com/dEClg9dW/signed-fit-image-boot
s-without-public-key

Yes, can you please reproduce the issue in question on the current tree, with a supported platform and provide the defconfig and steps you used for this issue? Thanks.

--

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

I've created a branch with some custom patches to make the fitimage booting currently, please try with the branch and the fitimage that are also committed [0].

The devices that I've tested this with is j721e-hs-evm, the defconfig to use for the builds are j721e_evm_r5_defconfig and j721e_evm_a72_defconfig. Although not synced up with the latest changes but for reference the SDK documentation can help if required

[1].

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

Attached the logs for reference with the signed fitimage and an unsigned uboot without any modifications[2].

[0]: https://github.com/manorit2001/u-boot/tree/fit-image-poc
[1]:
https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacint
o7/08_06_00_11/exports/docs/linux/Foundational_Components/U-

Boot/U

Quoted 11 lines
Quoted 10 lines
Quoted 4 lines

G-General-Info.html
[2]:
https://gist.github.com/manorit2001/3c49cfc19bf937783efb75fd4cddc5
8f

I don't see the problem there, but please go and investigate what problem you're seeing. The intention is that yes, with the appropriate CONFIG settings, you can set U-Boot to only boot signed FIT configurations and unsigned ones should not boot.

Quoted 9 lines
Quoted 6 lines
Quoted 6 lines

It boots with an unsigned fit too btw for reference [0]. The whole logic behind the authentication is that uboot stores the public key that is used for verification of the signed fit but apparantely if I haven't kept the public key in uboot dtb the fit images still boot whether signed or unsigned as that check is not guarded by anything if you see in the codebase[1].

Which uboot behaviour would you expect? If uboot is missing of the public key, it has no way to check signatures. Therefore either it boots everything (signed and unsigned) or it boots nothing (signed and unsigned). The second means it would be totally useless. So the first seems the only reasonable behaviour, IMO.

I would actually expect it to through some errors telling about all this instead of silently booting it, if the configurations of the dtb and the signing ain't proper I don't believe there is any way to know about any of this as it just boots up without any hint about it whatsoever, I believe if this is enabled then there should atleast be an optional config that allows people to get their environment right for validating all this.

Regards,
Manorit

Quoted 14 lines

Massimo

Quoted 12 lines
Quoted 4 lines

[0]:
https://gist.github.com/manorit2001/80c9242641141ac5bce0e335ea8a9f1a
[1]:
https://github.com/u-boot/u-

boot/blob/6dcee70692601bd3296c86ac07d0317b

Quoted 1 line

f06d2b7b/boot/image-fit-sig.c#L491-L496

Alright, please let us know what you find as indeed if you've set all the right options it's not supposed to boot unsigned images.

--
Tom

#8 lore raw

Re: R: Fit Signature booting without public key

Quoted 84 lines · Manorit Chawdhry

Hi,

Quoted 71 lines · Pegorer Massimo

Hi,

Quoted 69 lines

Inviato: venerdì 26 maggio 2023 15:00
Oggetto: Re: Fit Signature booting without public key

Quoted 12 lines · Manorit Chawdhry

Hi Tom,

Quoted 9 lines · Tom Rini
Quoted 8 lines · Manorit Chawdhry

Hi Tom,

Quoted 5 lines · Tom Rini
Quoted 3 lines · Manorit Chawdhry

Hi All,

I recently came upon a discussion that had happened a while back

[0].

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

I want to continue the discussion as I believe the issue still persists and the checks around fit signature booting are still the same, that allows booting the fit without changing the uboot

dtb.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Allowing the signed fit image without this seems to be a bypass that is available and should not be allowed without any gate to it for people who'd like to enforce these signing checks. Let me know if there is a config already available for it and if not, are there any plans to enable such a config in future. Would like to hear your opinions on this as I believe this

should be fixed as soon as possible.

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 4 lines

[0]:
https://u-boot.denx.narkive.com/dEClg9dW/signed-fit-image-boot
s-without-public-key

Yes, can you please reproduce the issue in question on the current tree, with a supported platform and provide the defconfig and steps you used for this issue? Thanks.

--

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

I've created a branch with some custom patches to make the fitimage booting currently, please try with the branch and the fitimage that are also committed [0].

The devices that I've tested this with is j721e-hs-evm, the defconfig to use for the builds are j721e_evm_r5_defconfig and j721e_evm_a72_defconfig. Although not synced up with the latest changes but for reference the SDK documentation can help if required

[1].

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

Attached the logs for reference with the signed fitimage and an unsigned uboot without any modifications[2].

[0]: https://github.com/manorit2001/u-boot/tree/fit-image-poc
[1]:
https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacint
o7/08_06_00_11/exports/docs/linux/Foundational_Components/U-

Boot/U

Quoted 11 lines
Quoted 10 lines
Quoted 4 lines

G-General-Info.html
[2]:
https://gist.github.com/manorit2001/3c49cfc19bf937783efb75fd4cddc5
8f

I don't see the problem there, but please go and investigate what problem you're seeing. The intention is that yes, with the appropriate CONFIG settings, you can set U-Boot to only boot signed FIT configurations and unsigned ones should not boot.

Quoted 9 lines
Quoted 6 lines
Quoted 6 lines

It boots with an unsigned fit too btw for reference [0]. The whole logic behind the authentication is that uboot stores the public key that is used for verification of the signed fit but apparantely if I haven't kept the public key in uboot dtb the fit images still boot whether signed or unsigned as that check is not guarded by anything if you see in the codebase[1].

Which uboot behaviour would you expect? If uboot is missing of the public key, it has no way to check signatures. Therefore either it boots everything (signed and unsigned) or it boots nothing (signed and unsigned). The second means it would be totally useless. So the first seems the only reasonable behaviour, IMO.

Quoted 7 lines

I would actually expect it to through some errors telling about all this instead of silently booting it, if the configurations of the dtb and the signing ain't proper I don't believe there is any way to know about any of this as it just boots up without any hint about it whatsoever, I believe if this is enabled then there should atleast be an optional config that allows people to get their environment right for validating all this.

Right. With the correct set of options you should be able to enforce only booting signed images. I thought that test/py/tests/test_vboot.py covered this combination as well, but if it's not it should be updated to.

Signature · 1 line
Tom
#9 lore raw

Re: R: Fit Signature booting without public key

Hi,

Quoted 94 lines · Tom Rini
Quoted 84 lines · Manorit Chawdhry

Hi,

Quoted 71 lines · Pegorer Massimo

Hi,

Quoted 69 lines

Inviato: venerdì 26 maggio 2023 15:00
Oggetto: Re: Fit Signature booting without public key

Quoted 12 lines · Manorit Chawdhry

Hi Tom,

Quoted 9 lines · Tom Rini
Quoted 8 lines · Manorit Chawdhry

Hi Tom,

Quoted 5 lines · Tom Rini
Quoted 3 lines · Manorit Chawdhry

Hi All,

I recently came upon a discussion that had happened a while back

[0].

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

I want to continue the discussion as I believe the issue still persists and the checks around fit signature booting are still the same, that allows booting the fit without changing the uboot

dtb.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Allowing the signed fit image without this seems to be a bypass that is available and should not be allowed without any gate to it for people who'd like to enforce these signing checks. Let me know if there is a config already available for it and if not, are there any plans to enable such a config in future. Would like to hear your opinions on this as I believe this

should be fixed as soon as possible.

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 4 lines

[0]:
https://u-boot.denx.narkive.com/dEClg9dW/signed-fit-image-boot
s-without-public-key

Yes, can you please reproduce the issue in question on the current tree, with a supported platform and provide the defconfig and steps you used for this issue? Thanks.

--

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

I've created a branch with some custom patches to make the fitimage booting currently, please try with the branch and the fitimage that are also committed [0].

The devices that I've tested this with is j721e-hs-evm, the defconfig to use for the builds are j721e_evm_r5_defconfig and j721e_evm_a72_defconfig. Although not synced up with the latest changes but for reference the SDK documentation can help if required

[1].

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

Attached the logs for reference with the signed fitimage and an unsigned uboot without any modifications[2].

[0]: https://github.com/manorit2001/u-boot/tree/fit-image-poc
[1]:
https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacint
o7/08_06_00_11/exports/docs/linux/Foundational_Components/U-

Boot/U

Quoted 11 lines
Quoted 10 lines
Quoted 4 lines

G-General-Info.html
[2]:
https://gist.github.com/manorit2001/3c49cfc19bf937783efb75fd4cddc5
8f

I don't see the problem there, but please go and investigate what problem you're seeing. The intention is that yes, with the appropriate CONFIG settings, you can set U-Boot to only boot signed FIT configurations and unsigned ones should not boot.

Quoted 9 lines
Quoted 6 lines
Quoted 6 lines

It boots with an unsigned fit too btw for reference [0]. The whole logic behind the authentication is that uboot stores the public key that is used for verification of the signed fit but apparantely if I haven't kept the public key in uboot dtb the fit images still boot whether signed or unsigned as that check is not guarded by anything if you see in the codebase[1].

Which uboot behaviour would you expect? If uboot is missing of the public key, it has no way to check signatures. Therefore either it boots everything (signed and unsigned) or it boots nothing (signed and unsigned). The second means it would be totally useless. So the first seems the only reasonable behaviour, IMO.

Quoted 7 lines

I would actually expect it to through some errors telling about all this instead of silently booting it, if the configurations of the dtb and the signing ain't proper I don't believe there is any way to know about any of this as it just boots up without any hint about it whatsoever, I believe if this is enabled then there should atleast be an optional config that allows people to get their environment right for validating all this.

Quoted 4 lines

Right. With the correct set of options you should be able to enforce only booting signed images. I thought that test/py/tests/test_vboot.py covered this combination as well, but if it's not it should be updated to.

This probably needs a new Kconfig, e.g. FIT_SIGNATURE_REQUIRED since people still do use non-signed FIT even when the U-Boot build supports signing. There is currently no way to know what to do when the public key is omitted.

Regards,
Simon