This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
[Bug/Security] Out-of-memory (OOM) panic while reading a circuit (MemoryBlock) #228
Labels
bug
Something isn't working
Aim
We (@FuzzingLabs & @lambdaclass) found an out-of-memory issue in acvm 0.9.0 while reading a circuit.
Expected behavior
It should not crash.
Bug
Root cause
Related code:
acvm/acir/src/circuit/opcodes.rs
Line 41 in 7352802
This issue occurs when reading a MemoryBlock. Before calling
Vec::with_capacity
, thelen
value should be checked and sanitized.This issue is similar to #187 and a similar fix using
try_reserve_exact
can be used here.Detailed behavior
To reproduce
Testing program:
Versions
Additional context
No response
Submission Checklist
The text was updated successfully, but these errors were encountered: