Sparkly Seaweed Wolf
High
The missing check in EthosProfile::inviteAddress() will allow that compromised msg.sender to invite users.
In EthosProfile.sol:210, users can invite other users into Ethos.
The problem is that we miss check whether msg.sender is one compromised address. In inviteAddress, we check msg.sender belongs to one active profile. But if one address is compromised and deleted by the profile, the variable profileIdByAddress
will still keep. So one compromised address can still invite users. This is unexpected behaviour.
function inviteAddress(
address invitee
) public whenNotPaused onlyNonZeroAddress(invitee) checkIfCompromised(invitee) {
(bool verified, bool archived, bool mock, uint256 profileId) = profileStatusByAddress(
msg.sender
);
...
}
function profileStatusByAddress(
address addressStr
) public view returns (bool verified, bool archived, bool mock, uint256 profileId) {
profileId = profileIdByAddress[addressStr];
(verified, archived, mock) = profileStatusById(profileId);
}
- One compromised address is deleted by the profile.
N/A
- One address is compromised and is deleted by the profile owner.
- The compromised address can still invite users and do some key operations, for example, delete other addresses which belong to the same profile.
If one address is compromised and deleted by the profile owner. This compromised address can still invite users, delete other addresses in this profile and do some other key operations.
N/A
We need to add one check whether msg.sender is compromised in inviteAddress(), deleteAddressAtIndex(), etc.