Llama - 0xcm'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: 27/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-L343

Vulnerability details

Title *

Missing Ether Transfer to LlamaExecutor Contract in ExecuteAction Function

Description

The executeAction function in the Llama contract fails to transfer Ether to the LlamaExecutor contract when calling the execute function. This is a critical oversight, as it means that the LlamaExecutor contract does not receive the intended Ether amount during the function execution, even though the value parameter suggests otherwise.

Impact

The missing Ether transfer may cause LlamaExecutor's execute function to fail, particularly in cases where a call operation is performed and the LlamaExecutor contract does not have sufficient Ether balance. This could lead to transaction failures and disrupt the correct execution of the contracts, potentially impacting users' funds or operations.

Proof of Concept

The code can be found in the executeAction function of the Llama contract:

// Execute action.
(bool success, bytes memory result) =
  executor.execute(actionInfo.target, actionInfo.value, action.isScript, actionInfo.data);

In this function, executor.execute is being called with actionInfo.value, but no Ether is actually sent to the LlamaExecutor contract.

Tools Used

  • ChatGPT May 24 Version
  • Modify the executeAction function to send Ether to the LlamaExecutor contract during the execute function call. This could be done by using the {value: actionInfo.value} syntax during the function call.
  • Ensure the execute function in the LlamaExecutor contract is marked as payable, enabling it to accept the transferred Ether.
  • Implement additional checks in the execute function to verify that the correct amount of Ether has been received.
  • Test the updated functions extensively to ensure they behave as expected and no new vulnerabilities have been introduced.

Assessed type

ETH-Transfer

#0 - c4-pre-sort

2023-06-19T11:11:30Z

0xSorryNotSorry marked the issue as duplicate of #255

#1 - c4-pre-sort

2023-06-19T11:13:22Z

0xSorryNotSorry marked the issue as not a duplicate

#2 - c4-pre-sort

2023-06-19T11:15:59Z

0xSorryNotSorry marked the issue as duplicate of #247

#3 - c4-judge

2023-07-02T10:20:26Z

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

#4 - c4-judge

2023-07-02T10:27:29Z

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