Skip to content

EifReader::from_eif does not read sections according to metadata in EifHeader #25

@foersleo

Description

@foersleo

The EifReader::from_eif function does not honor the description of sections set in the EifHeader. Instead, it starts parsing section headers starting directly after the last element it has parsed using a file seek based scheme (https://github.com/aws/aws-nitro-enclaves-image-format/blob/main/src/utils/eif_reader.rs#L103-L107). This means it does not do the validation of the file in the same way as the Nitro virtualization stack which goes by the section boundaries described in EifHeader.

This can be problematic with hand-crafted EIF that contains more data than the sections (e.g. gaps with random data between section). Handling of such files might yield undefined nitro-cli behavior.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions