Signature Verification Can Be Bypass With Zero Address
Submitted by (4) vlad_bochok, also found by indijanc, Lambda, and wastewa
Summary:
https://code4rena.com/reports/2022-08-rigor/#h-05-add-members-to-the-not-yet-created-community
Anyone can add himself as a member of community for any future community. This can be done due to a combination of facts:
Non initialized address storage values are defaulted to
address(0)addMemberdoesn't check if community is already createdcheckSignatureValiditydoesn't check foraddress(0)
Mitigation:
checkSignatureValidity/recoverKeyshould revert the call if anaddress == 0.addMembershould have arequire(_communityId <= communityCount)
TAGS: #sig
Last updated