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
Rank: 59/69
Findings: 1
Award: $33.54
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: MrPotatoMagic
Also found by: 0x11singh99, DadeKuma, Fassi_Security, JCK, Kalyan-Singh, Masamune, Myd, Pechenite, Sathish9098, Shield, albahaca, alexfilippov314, cheatc0d3, clara, foxb868, grearlake, hihen, imare, joaovwfreire, josephdara, ladboy233, monrel, n1punp, oualidpro, pa6kuda, pfapostol, rjs, slvDev, sxima, t0x1c, t4sk, zabihullahazadzoi
33.5408 USDC - $33.54
https://github.com/code-423n4/2024-03-taiko/blob/f58384f44dbf4c6535264a472322322705133b11/packages/protocol/contracts/L1/gov/TaikoGovernor.sol#L6 https://github.com/code-423n4/2024-03-taiko/blob/f58384f44dbf4c6535264a472322322705133b11/packages/protocol/package.json#L38-L39
The TaikoGovernor.sol
uses OZ "@openzeppelin/contracts-upgradeable/governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol"
version 4.8.2, which has a medium severity attached, that could lead to DoS in the case of proposal creation.
As you can see TaikoGovernor.sol
uses "@openzeppelin/contracts-upgradeable/governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol"
and "@openzeppelin/contracts-upgradeable/governance/GovernorUpgradeable.sol"
version 4.8.2 https://github.com/code-423n4/2024-03-taiko/blob/f58384f44dbf4c6535264a472322322705133b11/packages/protocol/package.json#L38-L39
but if we look closely on this version we can see that it has a medium severity https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-5h3x-9wvq-w4m2 , that specifies that proposal can be easily front-run by anyone, which could lead to Dos. In the codebase there is no actual protection against it since in both propose functions the main OZ function is called with super
keyword as can be seen here
https://github.com/code-423n4/2024-03-taiko/blob/f58384f44dbf4c6535264a472322322705133b11/packages/protocol/contracts/L1/gov/TaikoGovernor.sol#L58
https://github.com/code-423n4/2024-03-taiko/blob/f58384f44dbf4c6535264a472322322705133b11/packages/protocol/contracts/L1/gov/TaikoGovernor.sol#L81-L85
Manual review
Use the OZ library that has at least the version of 4.9.1, since that was the version that the problem was patched, to circumvent this issue.
Library
#0 - c4-pre-sort
2024-03-29T18:31:16Z
minhquanym marked the issue as duplicate of #304
#1 - c4-judge
2024-04-10T11:33:37Z
0xean marked the issue as satisfactory
#2 - c4-judge
2024-04-11T10:23:38Z
0xean changed the severity to QA (Quality Assurance)
#3 - c4-judge
2024-04-11T10:24:06Z
0xean marked the issue as grade-b