BASE - trysam2003's results

A secure, low-cost, developer-friendly Ethereum L2 built to bring the next billion users to web3.

General Information

Platform: Code4rena

Start Date: 26/05/2023

Pot Size: $100,000 USDC

Total HM: 0

Participants: 33

Period: 14 days

Judge: leastwood

Id: 241

League: ETH

BASE

Findings Distribution

Researcher Performance

Rank: 20/33

Findings: 1

Award: $813.40

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

813.4016 USDC - $813.40

Labels

bug
grade-b
QA (Quality Assurance)
Q-24

External Links

Incomplete "checks-effects-interactions" code practice

checks-effects-interactions code pattern is not completely followed in relayMessage() function. It can open CrossDomainMessenger contract to reentrancy vulnerabilities, though the chance is slim.

Affected Code Section https://github.com/ethereum-optimism/optimism/blob/382d38b7d45bcbf73cb5e1e3f28cbd45d24e8a59/packages/contracts-bedrock/contracts/universal/CrossDomainMessenger.sol#L303-L413

While it is beneficial to restrict copying returndata in the external contract to prevent direct reentry and exploitation of reentrancy vulnerabilities through return data manipulation, it is essential to emphasize that this measure alone does not provide comprehensive protection against all reentrancy attack scenarios. Other vectors and attack possibilities should be taken into consideration.

In the specific context of the relayMessage() function, where low-level calls to an external address are made using the SafeCall library while restricting copying returndata, it is important to acknowledge that reentrancy attacks can still occur through alternative avenues.

It is crucial to note that during the gas estimation period, multiple transactions triggered by the estimation address can be successful, potentially leading to a reentrancy hack.

Therefore, it is advised that the validation of "ESTIMATION ADDRESS" is done before the low level call.

#0 - 0xleastwood

2023-06-16T15:03:00Z

Not really sure about this one so will keep open for the Base protocol team to respond.

#1 - c4-judge

2023-06-16T15:03:07Z

0xleastwood marked the issue as grade-b

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