Rigor Protocol contest - Soosh's results

Community lending and instant payments for new home construction.

General Information

Platform: Code4rena

Start Date: 01/08/2022

Pot Size: $50,000 USDC

Total HM: 26

Participants: 133

Period: 5 days

Judge: Jack the Pug

Total Solo HM: 6

Id: 151

League: ETH

Rigor Protocol

Findings Distribution

Researcher Performance

Rank: 104/133

Findings: 1

Award: $40.62

🌟 Selected for report: 0

🚀 Solo Findings: 0

Low Risk Findings

Signatures can be reused on different chains

  • EIP712 domain is not used for the MetaTxs. https://eips.ethereum.org/EIPS/eip-712

  • This allows an attacker to replay a signed transaction on another app, version or chain.

  • The vulnerability lies in no domain seperator included in the hashes being signed in checkSignatureValidity()

  • In Rigor, there is a lot of variability in the hash being signed. For example, in addMember(), to successfully do a replay attack, the _communityID and _community.owner would have to match and you will be limited to adding only the same _newMemberAddr.

  • Unlikely isn't impossible and there is still a risk to the protocol's integrity.

Recommendations

  • A domain seperator should be included as part of the hash being signed. This prevents an attacker from replaying signed MetaTxs on other domains.
  • Taken from OZ, the below shows the digest being signed, which includes the domain seperator into the final hash to be signed
bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
keccak256("Mail(address to,string contents)"),
mailTo,
keccak256(bytes(mailContents))
)));
address signer = ECDSA.recover(digest, signature);

Links: https://github.com/code-423n4/2022-08-rigor/blob/5ab7ea84a1516cb726421ef690af5bc41029f88f/contracts/libraries/SignatureDecoder.sol#L20

Signature Malleability in recoverKey()

Links: https://github.com/code-423n4/2022-08-rigor/blob/5ab7ea84a1516cb726421ef690af5bc41029f88f/contracts/libraries/SignatureDecoder.sol#L20

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter