Skip to content

HAL-03 lack of validation on setblacklist message  #3254

@juniuszhou

Description

@juniuszhou

Description

The SetBlacklist message does not have any validation performed on itvia the ValidateBasic() method. It is recommended to always perform validations on messages via ValidateBasic() when possible.
A lack of validation here could allow for bad, meaningless data to be stored in the chain’s state, leading to unpredictable behaviour.
An attacker could also use this feature to deny service to Ethereum addresses that provide useful functionality to users, and thus degrade the availability of software functionality.

Recommendation

It is recommended to perform validation in ValidateBasic whenever possi�ble. In this specific case, JSON is passed into the Message containing Ethereum addresses.

The following list of validations could be performed:

  1. The JSON contains only valid Ethereum addresses
  2. Addresses that are used by the application (such as the Peggy bridge contract, other contracts known to be safe, contract libraries used by Sifchain, and so on) should not be permitted in the blacklist

Note that these suggestions are non-exhaustive, and it may be appropriate to add additional validations depending on the desired functionality of the blacklist.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions