There's an improper Role Management in laundrette::quitTheGang
function, allowing any gang member to remove another member from the gang. This functionality should only allow a member to remove themselves.
The laundrette::quitTheGang
function currently permits any gang member to remove any other member from the gang, including the godfather. This can lead to significant security risks where a gang member can remove all other members, including the godfather. Since laundrette::addToTheGang
has an onlyRole("gangmember") modifier, even the godfather is at risk of losing the ability to add gang members. The godfather should retain all rights and not be subject to removal by other members.
A gang member can remove all other gang members, including the godfather. This could result in a loss of control over the contract, as the godfather would no longer have the ability to manage gang members if removed.
Place the following into laundrette.t.sol
.
Manual Review, Foundry
Modify the quitTheGang function to only allow a member to remove themselves:
Remove the onlyRole("gangmember") modifier from the laundrette::addToTheGang
function to ensure the godfather retains the ability to add gang members:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.