Skip to content

Potentially underflow due to mal-aligned binary #16

@strazzere

Description

@strazzere

Found via fuzzing;

https://github.com/elfmaster/libelfmaster/blob/85e949c51b219594c0b3f4014cb09037f1442996/src/inte
rnal.c#L1329

This check will cause a malformed object to perform a (0 - 0) - 6 which will cause a very large number to be compared against i. Resulting in crashes often when ins[i] is used by the memcmp -- there needs to be a check to prevent this, likely returning 0.

Unsure if this needs to throw / catch extra issues downstream?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions