AI Arena - dvrkzy's results

In AI Arena you train an AI character to battle in a platform fighting game. Imagine a cross between Pokémon and Super Smash Bros, but the characters are AIs, and you can train them to learn almost any skill in preparation for battle.

General Information

Platform: Code4rena

Start Date: 09/02/2024

Pot Size: $60,500 USDC

Total HM: 17

Participants: 283

Period: 12 days

Judge:

Id: 328

League: ETH

AI Arena

Findings Distribution

Researcher Performance

Rank: 260/283

Findings: 1

Award: $0.12

🌟 Selected for report: 0

🚀 Solo Findings: 0

Lines of code

https://github.com/code-423n4/2024-02-ai-arena/blob/cd1a0e6d1b40168657d1aaee8223dc050e15f8cc/src/MergingPool.sol#L176 https://github.com/code-423n4/2024-02-ai-arena/blob/cd1a0e6d1b40168657d1aaee8223dc050e15f8cc/src/RankedBattle.sol#L390

Vulnerability details

Impact

Two of the loops in MergingPool.sol and RankedBattle.sol use roundId as upper bound for loop itteration.

This is a problem because there is no way to reset the roundId except to make new instances of the contracts.

This could lead to a DOS attack if the roundId gets too big and the functions will not be usable due to exceeding gas limit.

Even if it doesn't lead to a DOS attack eventually the functions will be too pricey to call.

Proof of Concept

https://github.com/code-423n4/2024-02-ai-arena/blob/cd1a0e6d1b40168657d1aaee8223dc050e15f8cc/src/MergingPool.sol#L131

https://github.com/code-423n4/2024-02-ai-arena/blob/cd1a0e6d1b40168657d1aaee8223dc050e15f8cc/src/RankedBattle.sol#L236

Tools Used

Manual review

I recommend implementing a way to reset the roundId

Assessed type

DoS

#0 - c4-pre-sort

2024-02-24T08:28:54Z

raymondfam marked the issue as sufficient quality report

#1 - c4-pre-sort

2024-02-24T08:29:04Z

raymondfam marked the issue as duplicate of #1541

#2 - c4-judge

2024-03-11T13:00:23Z

HickupHH3 marked the issue as duplicate of #216

#3 - c4-judge

2024-03-12T02:37:30Z

HickupHH3 marked the issue as partial-50

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