Closed sherlock-admin2 closed 9 months ago
1 comment(s) were left on this issue during the judging contest.
takarez commented:
valid because { Also a dupp of (014)}
Escalate
I believe that this is not a duplicate of #199.
The sole reason these issues were deemed duplicates is because they were both fixed in a single PR (which, by the way, we don't have access to and aren't aware of how it was implemented).
Different issues:
balances
array lengthDifferent impacts:
Different parts of the code and events when the issue is raised:
Merely because #199 submission mentions both issues and the fix was implemented in a single PR doesn't imply that those two issues are identical.
Such cases are referenced in the Sherlock documentation: "Do not submit multiple issues in a single submission. Even if the 2 completely different issues occur on the same line, please make sure to separately submit them".
Escalate
I believe that this is not a duplicate of #199.
The sole reason these issues were deemed duplicates is because they were both fixed in a single PR (which, by the way, we don't have access to and aren't aware of how it was implemented).
Different issues:
- Incorrect balance management
- Incorrect handling of the next token ID
- The token ID doesn't depend on the
balances
array lengthDifferent impacts:
- Balances cannot be claimed
- Tokens cannot be minted
Different parts of the code and events when the issue is raised:
- Burning
- Minting
Merely because #199 submission mentions both issues and the fix was implemented in a single PR doesn't imply that those two issues are identical.
Such cases are referenced in the Sherlock documentation: "Do not submit multiple issues in a single submission. Even if the 2 completely different issues occur on the same line, please make sure to separately submit them".
You've created a valid escalation!
To remove the escalation from consideration: Delete your comment.
You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final.
I believe there is a single issue here that propagated multiple negative affects. The inability to do future mint/burn/balance updates are all a result of the fact that the wrong index was removed. This is the reason that they were all fixed in a single PR.
Issue #199 arises from the removal of an item from the balances
array at an index that is still in use. This error occurs due to the incorrect use of the totalSupply
value from ERC721EnumerableUpgradeable
as the index for the next token ID.
Submissions #49 and #61 present these issues individually and provide separate fixes for each. This indicates that each issue exists independently. Even if the balances
array were updated correctly, the problem with minting would still persist.
You even say "after burning" yourself:
It is impossible to mint a new token after burning.
burn will brick many things, you just described another impact.
The root cause is the same, without calling burn
function, the provided impact won't happen
This is a duplicate and the root cause is the same.
Agree with sponsor, this issues should remain as duplicates.
Will reject escalation and keep issue state as is, because the root cause is the same.
Result: Duplicate of #199 High
The protocol team fixed this issue in PR/commit https://github.com/telcoin/telcoin-audit/pull/31.
The Lead Senior Watson signed off on the fix.
fibonacci
high
CouncilMember
: minting a new token is not possible after burningSummary
The
mint
function utilisestotalSupply
value astokenId
for a new token. The value of thetotalSupply
decreases when a token is burned. As a result, the next mint uses atokenId
that is already taken.Vulnerability Detail
The
CouncilMember
is inherited from theERC721EnumerableUpgradeable
which overrides the_update
function and decreasestotalSupply
value on burning.POC
Impact
It is impossible to mint a new token after burning.
Code Snippet
https://github.com/sherlock-audit/2024-01-telcoin/blob/main/telcoin-audit/contracts/sablier/core/CouncilMember.sol#L181
Tool used
Manual Review
Recommendation
Use separate variable to keep tracking of the next
tokenId
.Duplicate of #199