code-423n4 / 2024-04-ai-arena-mitigation-findings

0 stars 0 forks source link

H-07 MitigationConfirmed #46

Open c4-bot-1 opened 7 months ago

c4-bot-1 commented 7 months ago

Lines of code

Vulnerability details

Mitigation of H-07: Mitigated, with new issue or error

Mitigated issue

H-07: Fighters cannot be minted after the initial generation due to uninitialized numElements mapping

The issue was that numElements[] were not and could not be set.

Mitigation review - setter added

A function setNumElements() has been added.

New issue

Since numElements[] can now map to an arbitrary uint8 there is an issue if the number of elements for a generation is a multiple of 31. This is reported separately in "Element and weight correlation when numElements is multiple of 31".

c4-judge commented 7 months ago

jhsagd76 marked the issue as satisfactory

brandinho commented 6 months ago

numElements will never be a multiple of 31. I doubt we'll ever have more than 16 elements.