You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Justifications are sent as raw bytes over the network which are then decoded when they are verified in VerifyBlockJustification().
They are decoded using SCALE decoding, which allows excess bytes to be appended to the end of the data being decoded.
After verification, the original bytes are stored in the block state in handleJustification().
This poses a threat, as a malicious actor may append garbage bytes to the end of the justification. These bytes will then be stored in the block state. This is an attack vector for a user who may unnecessarily fill up disk space on a node with garbage bytes.
The Substrate implementation will decode then encode the justification and store the encoded bytes to ensure excess bytes are not included. Consider taking this approach or alternatively rejecting justifications with excess bytes appended as valid nodes will not include these.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Justifications are sent as raw bytes over the network which are then decoded when they are verified in
VerifyBlockJustification()
.They are decoded using SCALE decoding, which allows excess bytes to be appended to the end of the data being decoded.
After verification, the original bytes are stored in the block state in
handleJustification()
.This poses a threat, as a malicious actor may append garbage bytes to the end of the justification. These bytes will then be stored in the block state. This is an attack vector for a user who may unnecessarily fill up disk space on a node with garbage bytes.
The Substrate implementation will decode then encode the justification and store the encoded bytes to ensure excess bytes are not included. Consider taking this approach or alternatively rejecting justifications with excess bytes appended as valid nodes will not include these.
The text was updated successfully, but these errors were encountered: