code-423n4 / 2021-11-nested-findings

1 stars 1 forks source link

FeeSplitter: Unbounded number of shareholders can cause DOS #137

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

GreyArt

Vulnerability details

Impact

There is no limit to the number of shareholders. It is therefore possible to set a large number of shareholders such that _sendFees() will run out of gas when adding shares to each shareholder. This will cause denial of service to all NestedFactory functions, especially the ones that will remove funds like withdraw() and destroy().

Recommended Mitigation Steps

It would be best to set a sanity maximum number of shareholders that can be added.