Llama - Atree's results

A governance system for onchain organizations.

General Information

Platform: Code4rena

Start Date: 06/06/2023

Pot Size: $60,500 USDC

Total HM: 5

Participants: 50

Period: 8 days

Judge: gzeon

Id: 246

League: ETH

Llama

Findings Distribution

Researcher Performance

Rank: 14/50

Findings: 1

Award: $446.81

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: ktg

Also found by: 0xnev, Atree, BLOS, Toshii, auditor0517, xuwinnie

Labels

bug
2 (Med Risk)
downgraded by judge
satisfactory
duplicate-64

Awards

446.8103 USDC - $446.81

External Links

Lines of code

https://github.com/code-423n4/2023-06-llama/blob/9d641b32e3f4092cc81dbac7b1c451c695e78983/src/LlamaPolicy.sol#L404-L409

Vulnerability details

Impact

Malicious user can frontrun "createAction" to make "revokeExpiredRole" revert due to the "_assertNoActionCreationsAtCurrentTimestamp" check. So it is impossible to revoke a malicious role holder's role.

Proof of Concept

function _assertNoActionCreationsAtCurrentTimestamp() internal view { if (llamaExecutor == address(0)) return; // Skip check during initialization. address llamaCore = LlamaExecutor(llamaExecutor).LLAMA_CORE(); uint256 lastActionCreation = LlamaCore(llamaCore).getLastActionTimestamp(); if (lastActionCreation == block.timestamp) revert ActionCreationAtSameTimestamp(); }

If anyone is calling "revokeExpiredRole" to revoke an expired role and the role holder has action creation permission, the holder could frontrun the "createAction" function to make the "revokeExpiredRole" call revert because the lastActionCreation would then be equal to block.timestamp.

Tools Used

Manual Review

Delete "_assertNoActionCreationsAtCurrentTimestamp"

Assessed type

DoS

#0 - c4-pre-sort

2023-06-19T11:45:47Z

0xSorryNotSorry marked the issue as duplicate of #209

#1 - c4-judge

2023-07-02T11:13:15Z

gzeon-c4 changed the severity to 2 (Med Risk)

#2 - c4-judge

2023-07-02T11:13:42Z

gzeon-c4 marked the issue as satisfactory

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