Submitted by gpersoon, also found by MiloTruck
The function combinePermissions adds permission to available permissions.
If the same permission is added twice, then this will result in a new and different permission.
For example, adding _PERMISSION_STATICCALL twice results in _PERMISSION_SUPER_DELEGATECALL.
This way, accidentally dangerous permissions can be set. Once someone has a dangerous permission, for example _PERMISSION_SUPER_DELEGATECALL, they can change all storage parameters of the Universion Profile and then steal all the assets.
The following code shows this. Run with forge test -vv to see the console output.
See LSP6Utils.sol#L169-L177 for the code of combinePermissions.
Foundry
The permissions shouldnt be added, but they should be ORd.
Here is a way to solve this:
Math
CJ42 (LUKSO) disagreed with severity and commented:
Trust (judge) decreased severity to Medium and commented:
For this audit, 9 reports were submitted by wardens detailing low risk and non-critical issues. The report highlighted below by gpersoon received the top score from the judge.
The following wardens also submitted reports: MiloTruck, Rolezn, DavidGiladi, naman1778, banpaleo5, vnavascues, matrix_0wl, and catellatech.
