Skip to content

feature MCUBOOT_CHECK_HEADER_LOAD_ADDRESS: uses relative address comparison instead of absolute. #2768

Description

@nvlsianpu

When image load address feature is used it compares header's ih_load_addres field with image boundaries which are fetched from flash_area API which gives relative address (in relation to beginning of flash/MRAM./RRAM memory unit on which given slot partition exist).

This might imply issue when:
image physical address is different than relative. Can be workaround by signing using relative address - so not a serious issue,
For multi-image enabled: there are multiple memory units used in system.
Assuming these memory units,/b> are mapped physically on a system bus - there is possible to recognize address which belongs from one ort the other if address is expressed as Absolut. Obviously comparison a relative address witch absolute is unambiguous.

Solution:
Introduce default comparison using absolute addresses. keep previous comparison as optional for backward compatibility.

What this issue can not address:
Existence of primary slot partition on different memory units so partition address space overlaps. Simple example is a Device which has internal primary xip partition which begins from absolute address 0x0 and external primary xip partition (on QSPI for instance) which is also addressed from
0x0 (although CPU sees its address on a BUS which is most probably mapped unambiguously).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreAffects core functionalitysomedayTasks we'd like to do some day

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions