Llama - Go-Langer'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: 30/50

Findings: 1

Award: $54.53

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

Awards

54.5276 USDC - $54.53

Labels

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

External Links

Lines of code

https://github.com/code-423n4/2023-06-llama/blob/aac904d31639c1b4b4e97f1c76b9c0f40b8e5cee/src/LlamaCore.sol#L317 https://github.com/code-423n4/2023-06-llama/blob/aac904d31639c1b4b4e97f1c76b9c0f40b8e5cee/src/LlamaExecutor.sol#L29

Vulnerability details

Impact

Any ETH that is expected to be sent to the executor as part of the delegatecall, will not automatically be sent along with the call.

Proof of Concept

Llama Executor has an execute function, but it is not payable. When the execute function is called during executeAction function using either call or delegatecall, it does not automatically forward any value (ETH) that may have been sent to the executeAction function.

Tools Used

Manual Review

Consider making the execute function in the Executor payable.

function execute(address target, uint256 value, bool isScript, bytes calldata data) external payable returns (bool success, bytes memory result) { if (msg.sender != LLAMA_CORE) revert OnlyLlamaCore(); (success, result) = isScript ? target.delegatecall{value: msg.value}(data) : target.call{value: msg.value}(data); } receive() external payable { (optional) }

By adding the payable modifier to the execute function, it becomes capable of receiving ETH along with the function call. The received ETH will be stored in the executor contract.

Assessed type

ETH-Transfer

#0 - c4-pre-sort

2023-06-19T11:14:52Z

0xSorryNotSorry marked the issue as duplicate of #247

#1 - c4-judge

2023-07-02T10:20:25Z

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

#2 - c4-judge

2023-07-02T10:31:16Z

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