Skip to content

Dangerous VLA allocation In stsafea_frame_receive() #53

@parmi93

Description

@parmi93

A Variable Length Array (VLA) is allocated based on the response received from the STSAFE chip via I2C. However, no sanity check is performed on the response before the allocation. If the response is corrupted, for instance, due to a bit-flip caused by noise on the I2C line, it could trigger a VLA allocation of up to 65 KiB. This would almost certainly lead to a stack overflow and an application crash.

PLAT_UI8 filler[filler_size];

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