tokamak-network / tokamak-dao-contracts

4 stars 1 forks source link

DAO vulnerability: setExecutedCount method issue #7

Open zzooppii opened 1 month ago

zzooppii commented 1 month ago

Describe the bug

Configuration

Impact

  1. When the variable of atomicExecute is executed as false during createAgenda, the executeStartFrom value of the agenda is adjusted so that a specific function can be skipped and executed when there are multiple functions. Through this, when there are multiple agendas to execute, the execution of functions except for the last function can be adjusted.

  2. If the agenda is maliciously executed so that the last function always fails, the agenda can be continuously executed.

Recommendation

Exploit Scenario

Demo

zzooppii commented 1 month ago

@blackcow1987 3,300 TON has been paid as bounty

zzooppii commented 1 month ago

Problem function : https://github.com/tokamak-network/tokamak-dao-contracts/blob/main/contracts/dao/DAOAgendaManager.sol#L389-L392

zzooppii commented 4 weeks ago

Fix Bug Commit : https://github.com/tokamak-network/ton-staking-v2/commit/1457d3733570e4905c9d15f863c9bfeebf673d82

suahnkim commented 2 weeks ago

this issue will be closed when DAO is upgraded on the mainnet