Skip to content

Partial firmware update is not working for Flash boot System #250

Open
@whou-sfx

Description

@whou-sfx

Based on the description of the Image Update Flow and the format of the Soc Manifest, it appears that the system is unable to support partial firmware updates for either the MCU RT image or any of the SocImages[1..N] on Flash Boot System.

The Caliptra public key is used to verify the preamble signature of the Soc Manifest. Subsequently, the public key from the preamble is used to verify the signature of the IMC (Image Manifest Content). Then the image_hash of IME (Image Manifest Entry) is ued to verify the Image binary.

When performing a partial image update for one of the firmware components, such as SocImage[1], the vendor must provide:

  • A new Soc Manifest that includes only one IME for SocImage[1].
  • The image binary for SocImage[1].

Since the Soc Manifest can be signed by the vendor/owner's private key, it can pass the manifest verification process. The image_hash field in the IME of the Soc Manifest can then be used to verify the image binary of SocImage[1]. Thus, the online active check and verification steps are successful.

However, when applying the image update, the MCU RT will program the Soc Manifest and SocImage[1] into the NorFlash. At this point, it becomes impossible to obtain a valid Soc Manifest for the following reasons:

  • The new Soc Manifest being updated only contains valid information for SocImage[1]. It does not (and cannot) include valid information for the other images (MCU RT image or SocImage[2..N]). The device cannot calculate a new Soc Manifest because it does not know the vendor/owner's private key. Therefore, it is unable to generate the IMC signature after combining the IMEs of the MCU RT image, SocImage[2..N], and the new IME for SocImage[1].
  • If the new Soc Manifest is directly programmed into the flash, during the next boot, the MCU RT and SocImage[2..N] will fail the authorization process.

Additionally, the vendor cannot generate a fully valid Soc Manifest for all images on the board because the versions of the MCU RT image and SocImage[1..N] may vary after several partial firmware update processes.

One possible solution is to replace the image_hash field in each IME with a signature (using LMS and ECC, signed by Vendor/Owner Private key) to decouple the IMC signature verification process. However, this would require more storage space (increasing from 48 bytes to 96 bytes + 1620 bytes).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions