Skip to content

Hash calculation fails if MCUBOOT_HASH_STORAGE_DIRECTLY is used and NVM does not start at 0x0 #2368

@tomchy

Description

@tomchy

If the MCUBOOT_HASH_STORAGE_DIRECTLY option is enabled and the NVM memory does not start at 0x0, then casting the value returned by the flash_area_get_off(fap) to void * results in going through a different memory region than expected (and possible cause faults).

Since flash area already has a dedicated function to get the base address for the offsets (flash_device_base), it may be used to fix the address calculation and allow to use MCUBOOT_HASH_STORAGE_DIRECTLY on such platforms.

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