Closed code423n4 closed 1 year ago
Does not apply, as to unfollow you need to be following, which makes the _followerCount > 0. Becuase the _followerCount is incremented when migrating too.
donosonaumczuk marked the issue as sponsor disputed
Picodes marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2023-07-lens/blob/cdef6ebc6266c44c7068bc1c4c04e12bf0d67ead/contracts/FollowNFT.sol#L420
Vulnerability details
Impact
The previous
FollowNFT
implementation is different between v1.3 and v2.0. The_followerCount
is 0 for existingFollowNFT
(even if_lastFollowTokenId
is not 0) after upgrade.It is possible that
_followerCount--
can underflow(suppose the migration is not completed).Proof of Concept
I submitted this in the last minute. Sorry that I do not have a POC.
link to the test to test the value of
_followerCount
.How to run the test:
_tokenIdCounter
v1.3 is 0x55(85 decimal).output:
Recommended Mitigation Steps
N/A
Assessed type
Upgradable