AI Arena - Sabit'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: 25/283

Findings: 2

Award: $246.18

🌟 Selected for report: 0

πŸš€ Solo Findings: 0

Awards

7.2869 USDC - $7.29

Labels

bug
2 (Med Risk)
insufficient quality report
partial-25
:robot:_12_group
duplicate-1507

External Links

Lines of code

https://github.com/code-423n4/2024-02-ai-arena/blob/cd1a0e6d1b40168657d1aaee8223dc050e15f8cc/src/Neuron.sol#L90-L96

Vulnerability details

Impact

Added minter addresses are permanent and cannot be revoked.

Proof of Concept

The addMinter function allows new minter addresses to be added, but there is no corresponding function to remove minter addresses. This is a bug because minter addresses cannot be revoked.

https://github.com/code-423n4/2024-02-ai-arena/blob/cd1a0e6d1b40168657d1aaee8223dc050e15f8cc/src/Neuron.sol#L90-L96

Tools Used

Manual review

Add a function that allows owner to remove minter addresses.

Assessed type

Access Control

#0 - c4-pre-sort

2024-02-25T16:09:17Z

raymondfam marked the issue as insufficient quality report

#1 - c4-pre-sort

2024-02-25T16:09:53Z

raymondfam marked the issue as duplicate of #20

#2 - c4-judge

2024-03-05T10:08:55Z

HickupHH3 marked the issue as partial-25

Awards

7.2869 USDC - $7.29

Labels

bug
2 (Med Risk)
insufficient quality report
partial-25
:robot:_153_group
duplicate-1507

External Links

Lines of code

https://github.com/code-423n4/2024-02-ai-arena/blob/cd1a0e6d1b40168657d1aaee8223dc050e15f8cc/src/Neuron.sol#L101-L104

Vulnerability details

Impact

Detailed description of the impact of this finding.

Proof of Concept

The addStaker function allows new staker addresses to be added.

However, there is no function to remove or revoke a staker address. Once an address is added as a staker, it will remain a valid staker indefinitely.

This is a bug because it means there is no way to remove a staker's privileges if their address is compromised or needs to be revoked for any other reason.

https://github.com/code-423n4/2024-02-ai-arena/blob/cd1a0e6d1b40168657d1aaee8223dc050e15f8cc/src/Neuron.sol#L101-L104

Tools Used

Manual review

Add a function that can revoke added staker addresses.

Assessed type

Access Control

#0 - c4-pre-sort

2024-02-24T06:23:37Z

raymondfam marked the issue as insufficient quality report

#1 - c4-pre-sort

2024-02-24T06:23:54Z

raymondfam marked the issue as duplicate of #20

#2 - c4-judge

2024-03-05T10:03:10Z

HickupHH3 marked the issue as not a duplicate

#3 - c4-judge

2024-03-05T10:04:03Z

HickupHH3 marked the issue as duplicate of #1507

#4 - c4-judge

2024-03-05T10:04:07Z

HickupHH3 marked the issue as partial-25

Awards

7.2869 USDC - $7.29

Labels

bug
2 (Med Risk)
insufficient quality report
partial-25
:robot:_12_group
duplicate-1507

External Links

Lines of code

https://github.com/code-423n4/2024-02-ai-arena/blob/cd1a0e6d1b40168657d1aaee8223dc050e15f8cc/src/Neuron.sol#L109-L112

Vulnerability details

Impact

Detailed description of the impact of this finding.

Proof of Concept

https://github.com/code-423n4/2024-02-ai-arena/blob/cd1a0e6d1b40168657d1aaee8223dc050e15f8cc/src/Neuron.sol#L109-L112

The addSpender function adds a new address to the spender role.

This gives newSpenderAddress the ability to spend tokens from the contract.

However, there is no corresponding function to revoke or remove a spender address. Once an address is granted spender privileges, those privileges remain indefinitely.

This is a bug because compromised or unauthorized spender addresses cannot have their privileges revoked. The contract should have a revokeSpender function to remove spenders when necessary.

Tools Used

Manual review

Assessed type

Access Control

#0 - c4-pre-sort

2024-02-25T16:10:29Z

raymondfam marked the issue as insufficient quality report

#1 - c4-pre-sort

2024-02-25T16:10:36Z

raymondfam marked the issue as duplicate of #20

#2 - c4-judge

2024-03-05T10:09:07Z

HickupHH3 marked the issue as partial-25

Findings Information

Awards

238.8948 USDC - $238.89

Labels

bug
2 (Med Risk)
insufficient quality report
satisfactory
:robot:_01_group
duplicate-47

External Links

Lines of code

https://github.com/code-423n4/2024-02-ai-arena/blob/cd1a0e6d1b40168657d1aaee8223dc050e15f8cc/src/GameItems.sol#L185-L189

Vulnerability details

Impact

Allowed burning addresses cannot be removed

Proof of Concept

The setAllowedBurningAddresses function is intended to allow the admin to set and update which addresses are allowed to burn tokens. However, there is a logical flaw in the function implementation that prevents removing addresses from the allow list once added.

Specifically, the function only includes logic to add new addresses to the allowedBurningAddresses mapping, by setting their mapping value to true. There is no functionality to later set their value back to false to remove access.

This means any address that is ever set as an allowed burning address can never have that permission revoked, even by the admin. This violates the expected functionality and gives permanent privileged access.

https://github.com/code-423n4/2024-02-ai-arena/blob/cd1a0e6d1b40168657d1aaee8223dc050e15f8cc/src/GameItems.sol#L185-L189

Tools Used

Manual review

Include how to remove an added address from the mapping.

Assessed type

Context

#0 - c4-pre-sort

2024-02-22T19:28:44Z

raymondfam marked the issue as insufficient quality report

#1 - c4-pre-sort

2024-02-22T19:28:52Z

raymondfam marked the issue as duplicate of #47

#2 - c4-judge

2024-03-08T03:29:29Z

HickupHH3 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