Taiko - lightoasis's results

A based rollup -- inspired, secured, and sequenced by Ethereum.

General Information

Platform: Code4rena

Start Date: 04/03/2024

Pot Size: $140,000 USDC

Total HM: 19

Participants: 69

Period: 21 days

Judge: 0xean

Total Solo HM: 4

Id: 343

League: ETH

Taiko

Findings Distribution

Researcher Performance

Rank: 14/69

Findings: 1

Award: $1,954.13

🌟 Selected for report: 1

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: lightoasis

Also found by: 0xleadwizard, Tendency, alexfilippov314, ladboy233, wangxx2026

Labels

bug
3 (High Risk)
primary issue
satisfactory
selected for report
sponsor confirmed
sufficient quality report
edited-by-warden
:robot:_60_group
H-05

Awards

1954.1278 USDC - $1,954.13

External Links

Lines of code

https://github.com/code-423n4/2024-03-taiko/blob/f58384f44dbf4c6535264a472322322705133b11/packages/protocol/contracts/team/TimelockTokenPool.sol#L170

Vulnerability details

Impact

Signatures can be replayed in withdraw() to withdraw more tokens than the user originally intended.

Vulnerability Details

In the TimelockTokenPool.sol contracts, users can provide a signature to allow someone else to withdraw all their withdrawable tokens on their behalf using their signature. TimelockTokenPool.sol#L170)

function withdraw(address _to, bytes memory _sig) external { if (_to == address(0)) revert INVALID_PARAM(); bytes32 hash = keccak256(abi.encodePacked("Withdraw unlocked Taiko token to: ", _to)); @> address recipient = ECDSA.recover(hash, _sig); _withdraw(recipient, _to); }

As seen from above, the signature provided does not include a nonce and this can lead to signature replay attacks. Due to the lack of a nonce, withdraw() can be called multiple times with the same signature. Therefore, if a user provides a signature to withdraw all his withdrawable tokens at one particular time, an attacker can repeatedly call withdraw() with the same signature to withdraw more tokens than the user originally intended. The vulnerability is similar to Arbitrum H-01 where user's signatures could be replayed to use up more votes than a user intended due to a lack of nonce.

Tools Used

Manual Review

Consider using a nonce or other signature replay protection in the TimelockTokenPool contract.

Assessed type

Invalid Validation

#0 - c4-pre-sort

2024-03-28T18:49:48Z

minhquanym marked the issue as primary issue

#1 - c4-pre-sort

2024-03-28T18:51:36Z

minhquanym marked the issue as sufficient quality report

#2 - dantaik

2024-04-02T13:28:28Z

Valid bug report, trying to fix it in this PR: https://github.com/taikoxyz/taiko-mono/pull/16611/files

#3 - c4-sponsor

2024-04-05T07:44:36Z

dantaik (sponsor) confirmed

#4 - c4-judge

2024-04-09T13:27:43Z

0xean marked the issue as satisfactory

#5 - c4-judge

2024-04-10T11:21:07Z

0xean marked the issue as selected for report

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