zkSync Era - zhanmingjing's results

General Information

Platform: Code4rena

Start Date: 07/03/2024

Pot Size: $250,000 USDC

Total HM: 5

Participants: 24

Period: 21 days

Judge: 0xsomeone

Total Solo HM: 3

Id: 347

League: ETH

zkSync

Findings Distribution

Researcher Performance

Rank: 20/24

Findings: 1

Award: $423.87

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

Labels

bug
2 (Med Risk)
downgraded by judge
partial-75
edited-by-warden
:robot:_07_group
duplicate-97

Awards

423.8686 USDC - $423.87

External Links

Lines of code

https://github.com/code-423n4/2024-03-zksync/blob/main/code/contracts/ethereum/contracts/state-transition/StateTransitionManager.sol#L159-L167

Vulnerability details

Impact

state-transition#unfreezeChain is freezeChain in fact. When owner tries to unfreezeChain, he freezeChain again, which means, he couldn't unfreeze chain.

Proof of Concept

https://github.com/code-423n4/2024-03-zksync/blob/main/code/contracts/ethereum/contracts/state-transition/StateTransitionManager.sol#L159-L167

/// @dev freezes the specified chain function freezeChain(uint256 _chainId) external onlyOwner { IZkSyncStateTransition(stateTransition[_chainId]).freezeDiamond(); } /// @dev freezes the specified chain function unfreezeChain(uint256 _chainId) external onlyOwner { IZkSyncStateTransition(stateTransition[_chainId]).freezeDiamond(); }

In function unfreezeChain(), shoud be : IZkSyncStateTransition(stateTransition[_chainId]).unfreezeDiamond();

Tools Used

manually reviewed.

change function unfreezeChain() to the following:

function unfreezeChain(uint256 _chainId) external onlyOwner { IZkSyncStateTransition(stateTransition[_chainId]).unfreezeDiamond(); }

Assessed type

Other

#0 - c4-judge

2024-04-02T17:03:01Z

alex-ppg marked the issue as duplicate of #97

#1 - c4-judge

2024-04-02T17:03:32Z

alex-ppg changed the severity to 3 (High Risk)

#2 - c4-judge

2024-04-29T13:51:53Z

alex-ppg changed the severity to 2 (Med Risk)

#3 - c4-judge

2024-04-29T13:55:30Z

alex-ppg marked the issue as partial-75

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