Popcorn contest - okkothejawa's results

A multi-chain regenerative yield-optimizing protocol.

General Information

Platform: Code4rena

Start Date: 31/01/2023

Pot Size: $90,500 USDC

Total HM: 47

Participants: 169

Period: 7 days

Judge: LSDan

Total Solo HM: 9

Id: 211

League: ETH

Popcorn

Findings Distribution

Researcher Performance

Rank: 69/169

Findings: 1

Award: $122.61

🌟 Selected for report: 0

πŸš€ Solo Findings: 0

Findings Information

🌟 Selected for report: ustas

Also found by: 0xRobocop, Ada, bin2chen, georgits, gjaldon, hashminer0725, ktg, mert_eren, okkothejawa, pwnforce

Labels

bug
3 (High Risk)
disagree with severity
satisfactory
sponsor confirmed
duplicate-45

Awards

122.6059 USDC - $122.61

External Links

Lines of code

https://github.com/code-423n4/2023-01-popcorn/blob/main/src/vault/VaultController.sol#L669

Vulnerability details

Impact

The access control check _verifyCreatorOwner falsely checks if the address is creator of the vault AND the owner of the vault controller, instead of checking if address is creator of the vault OR owner of the vault controller. As this access control function is utilized in many vital public functions of VaultController, and as the creator of a vault is not necessarily the owner of the Vault controller at all times, this issue may lead to denial of service problems.

Proof of Concept

if (msg.sender != metadata.creator || msg.sender != owner) revert NotSubmitterNorOwner(msg.sender);

As can be seen above, the check reverts if msg.sender is not the vault creator or if msg.sender is not the owner of the VaultController contract. The negation of this check, which would give the allowed state, is

msg.sender == metadata.creator && msg.sender == owner

which shows that check is actually checking if the caller is vault creator AND the owner of the vault controller.

Tools Used

Manual review

Change the line to

if (msg.sender != metadata.creator && msg.sender != owner) revert NotSubmitterNorOwner(msg.sender);

so it reverts if the caller is not the vault creator nor owner.

#0 - c4-judge

2023-02-16T07:24:47Z

dmvt marked the issue as duplicate of #45

#1 - c4-sponsor

2023-02-18T12:08:31Z

RedVeil marked the issue as disagree with severity

#2 - c4-sponsor

2023-02-18T12:08:42Z

RedVeil marked the issue as sponsor confirmed

#3 - c4-judge

2023-02-23T00:17:15Z

dmvt 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