Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: high
Invalid

Uninitialized storage variable

Summary

in the /src/module/Trustee.sol contract, the address trustee` variable isn't set to the "msg.sender"

Vulnerability Details

```

abstract contract Trustee {
error NotTrustee(address);
* address trustee;
address assetToPay;
mapping(uint256 NftIndex => uint256 value) nftValue;
modifier onlyTrustee() {
if (msg.sender != trustee) {
revert NotTrustee(msg.sender);
}
_;
}

Impact

High severity because the attacker can make himself the owner of the contract and become the trustee himself

Tools Used

manual review

Recommendations

abstract contract Trustee {
error NotTrustee(address);
address trustee;
address assetToPay;
+ trustee = msg.sender;
mapping(uint256 NftIndex => uint256 value) nftValue;
modifier onlyTrustee() {
if (msg.sender != trustee) {
revert NotTrustee(msg.sender);
}
_;
}
Updates

Lead Judging Commences

0xtimefliez Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement
0xtimefliez Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.