Hello @Harvey021 ,
Thank you very much for your quick response.
First, here are the answers to your questions:
"Why do you want to authenticate the ELE container?":
My goal is to verify all images or container elements for validity before storing them.
The reason for this is to ensure a secure and guaranteed boot process after an update.
In the field, the firmware is always received from an untrusted source within a security context, regardless of whether it's delivered over the internet or via an external interface such as USB devices.
Whoever controls the external source also controls what is stored.
Therefore, I want to implement an end-to-end validation of the images.
The i.MX93 is capable of verifying the container to be stored based on the signature and the SRKH values.
If the images are not verified before being written to storage, there is no way to ensure that they haven’t been tampered with.
Here is a simple example:
An attacker gains access to an external update source and replaces flash.bin with a malicious flash-evil.bin.
This flash-evil.bin contains a tampered 1st boot container (ELE firmware).
Scenario 1:
The ELE image is filled with NULL data, but the container header remains unchanged.
In this case, the SHA hash in the container header will not match the image content.
A hash check will detect this mismatch, and the image will not be stored.
Scenario 2:
The ELE image is filled with NULL data, and the SHA hash in the container header is adapted to match the tampered image.
Now, the hash check of the image content matches the header, and the image is seen as valid.
If this is an OEM container, the signature of the container header can be verified, and the mismatch will be detected.
However, for NXP containers, I don’t have a way to verify the header signature.
I must assume the signature is valid.
This forces me to store a faulty container.
If the board is closed (i.e., secure boot is enabled), the attacker has successfully executed a Denial-of-Service (DoS) attack, because during AHAB secure boot, a container with an invalid signature cannot be loaded.
The system will not boot, resulting in a critical failure.
If the malicious flash-evil.bin is distributed through an online update infrastructure accessed by multiple boards simultaneously, the damage multiplies.
So my key question is:
What options do I have to verify the ELE firmware, which is obtained from untrusted sources, before storing it as the next boot image on the eMMC?
The only approach I can currently think of is to parse the signature block, extract the certificate and SRKs, recalculate the SRKHs, and verify them within my own application logic.
How do you assess the risk of DoS attacks in a secure boot context?
In your opinion, what is the best way to protect against this?
Has NXP perhaps already provided a solution or at least a recommendation to address this issue?
Thank you very much for your support.