AleoNet / snarkVM

A Virtual Machine for Zero-Knowledge Executions
https://snarkvm.org
Apache License 2.0
1.08k stars 1.5k forks source link

[Bug] Deserialization/Parsing consumes more input than permitted. #1359

Open d0cd opened 1 year ago

d0cd commented 1 year ago

🐛 Bug Report

A number of datatypes implement the FromBytes, ToBytes, and Parser traits. Some implementations are initially more permissive, for example:

A potential attack vector is that a malicious actor can send a node large messages that may waste a node's compute. Of course, this can be mitigated by fees. Ideally, the deserializer/parser should stop as soon as the input exceeds the bounds set by NETWORK.

Some further questions:

raychu86 commented 5 days ago

Should be resolved with https://github.com/AleoNet/snarkVM/pull/1988