Skip to content

Possible Bug: Out-of-bounds/invalid sizing #116

@autoDetector

Description

@autoDetector

Vulnerable File: circuits/aes-gcm/gctr.circom
commit: 9ef4926c8fec7784ddf2f6da2de3791da839983a

When INPUT_LEN < 16 (nBlocks = 0):

  • CounterBlocks is declared with dimension [nBlocks][4][4], then CounterBlocks[0] is written; this is out-of-bounds when nBlocks = 0.
  • inc32[nBlocks - 1] becomes inc32[-1], which is invalid.
  • aes[nBlocks].block <== CounterBlocks[nBlocks-1] accesses CounterBlocks[-1].

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